gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] 02/02: fix leak


From: gnunet
Subject: [taler-exchange] 02/02: fix leak
Date: Tue, 31 Mar 2020 15:13:07 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

commit 73d107b53d5f3c1461a74f280a84a1ab80d14360
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Mar 31 15:11:54 2020 +0200

    fix leak
---
 src/exchange/taler-exchange-httpd.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/exchange/taler-exchange-httpd.c 
b/src/exchange/taler-exchange-httpd.c
index f5acd1cd..de251acb 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -339,9 +339,15 @@ proceed_with_handler (const struct TEH_RequestHandler *rh,
                                      upload_data_size,
                                      &root);
     if (GNUNET_SYSERR == res)
+    {
+      GNUNET_assert (NULL == root);
       return MHD_NO;  /* bad upload, could not even generate error */
+    }
     if ( (GNUNET_NO == res) || (NULL == root) )
+    {
+      GNUNET_assert (NULL == root);
       return MHD_YES; /* so far incomplete upload or parser error */
+    }
   }
 
   {
@@ -381,6 +387,8 @@ proceed_with_handler (const struct TEH_RequestHandler *rh,
                          rh->url,
                          url);
         GNUNET_break_op (0);
+        if (NULL != root)
+          json_decref (root);
         return TALER_MHD_reply_with_error (connection,
                                            MHD_HTTP_NOT_FOUND,
                                            TALER_EC_WRONG_NUMBER_OF_SEGMENTS,

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



reply via email to

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