gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] branch master updated: fix remaining leak


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated: fix remaining leak from #5050
Date: Sun, 04 Jun 2017 12:24:55 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 2f74a5b  fix remaining leak from #5050
2f74a5b is described below

commit 2f74a5b00eeb0fca35e51abf35bd7e82b43a90ef
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Jun 4 12:24:51 2017 +0200

    fix remaining leak from #5050
---
 src/exchange-lib/exchange_api_handle.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/exchange-lib/exchange_api_handle.c 
b/src/exchange-lib/exchange_api_handle.c
index 40e5107..590d4de 100644
--- a/src/exchange-lib/exchange_api_handle.c
+++ b/src/exchange-lib/exchange_api_handle.c
@@ -413,8 +413,7 @@ parse_json_auditor (struct 
TALER_EXCHANGE_AuditorInformation *auditor,
     struct TALER_AuditorSignatureP auditor_sig;
     struct GNUNET_HashCode denom_h;
     const struct TALER_EXCHANGE_DenomPublicKey *dk;
-    unsigned int j;
-    struct GNUNET_JSON_Specification spec[] = {
+    struct GNUNET_JSON_Specification kspec[] = {
       GNUNET_JSON_spec_fixed_auto ("denom_pub_h",
                                    &denom_h),
       GNUNET_JSON_spec_fixed_auto ("auditor_sig",
@@ -424,14 +423,14 @@ parse_json_auditor (struct 
TALER_EXCHANGE_AuditorInformation *auditor,
 
     if (GNUNET_OK !=
         GNUNET_JSON_parse (key,
-                           spec,
+                           kspec,
                            NULL, NULL))
       {
       GNUNET_break_op (0);
       continue;
     }
     dk = NULL;
-    for (j=0;j<key_data->num_denom_keys;j++)
+    for (unsigned int j=0;j<key_data->num_denom_keys;j++)
     {
       if (0 == memcmp (&denom_h,
                        &key_data->denom_keys[j].h_key,
@@ -468,12 +467,14 @@ parse_json_auditor (struct 
TALER_EXCHANGE_AuditorInformation *auditor,
                                     &auditor->auditor_pub.eddsa_pub))
     {
       GNUNET_break_op (0);
+      GNUNET_JSON_parse_free (spec);
       return GNUNET_SYSERR;
     }
     auditor->denom_keys[off] = dk;
     off++;
   }
   auditor->num_denom_keys = off;
+  GNUNET_JSON_parse_free (spec);
   return GNUNET_OK;
 }
 

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



reply via email to

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