gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant] branch master updated: clean up leaks, check URL constr


From: gnunet
Subject: [taler-merchant] branch master updated: clean up leaks, check URL construction worked
Date: Sat, 09 Nov 2019 14:36:16 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new af6293c  clean up leaks, check URL construction worked
af6293c is described below

commit af6293c5ef3272ad51567edb15901b7b6bfeab6b
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Nov 9 14:36:14 2019 +0100

    clean up leaks, check URL construction worked
---
 src/lib/merchant_api_proposal.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/lib/merchant_api_proposal.c b/src/lib/merchant_api_proposal.c
index de2a228..920f08e 100644
--- a/src/lib/merchant_api_proposal.c
+++ b/src/lib/merchant_api_proposal.c
@@ -393,16 +393,27 @@ TALER_MERCHANT_proposal_lookup (struct 
GNUNET_CURL_Context *ctx,
                              "nonce",
                              nonce_str,
                              NULL);
+  GNUNET_free_non_null (nonce_str);
+  if (NULL == plo->url)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Could not construct request URL. Is `%s' valid?\n",
+                backend_url);
+    GNUNET_free (plo);
+    return NULL;
+  }
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "looking up proposal from %s\n",
               plo->url);
-
   eh = curl_easy_init ();
   if (CURLE_OK != curl_easy_setopt (eh,
                                     CURLOPT_URL,
                                     plo->url))
   {
     GNUNET_break (0);
+    curl_easy_cleanup (eh);
+    GNUNET_free (plo->url);
+    GNUNET_free (plo);
     return NULL;
   }
 
@@ -413,6 +424,8 @@ TALER_MERCHANT_proposal_lookup (struct GNUNET_CURL_Context 
*ctx,
                                                plo)))
   {
     GNUNET_break (0);
+    GNUNET_free (plo->url);
+    GNUNET_free (plo);
     return NULL;
   }
   return plo;

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]