gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] 10/15: fix memory leak


From: gnunet
Subject: [taler-anastasis] 10/15: fix memory leak
Date: Sun, 31 Jan 2021 17:06:16 +0100

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

dennis-neufeld pushed a commit to branch master
in repository anastasis.

commit ad2779c682957da021b4d11e45f91f85be737c6b
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Tue Jan 19 21:07:40 2021 +0100

    fix memory leak
---
 src/lib/anastasis.c           |  2 ++
 src/lib/anastasis_api_redux.c | 18 +++---------------
 2 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/src/lib/anastasis.c b/src/lib/anastasis.c
index a202412..db97095 100644
--- a/src/lib/anastasis.c
+++ b/src/lib/anastasis.c
@@ -993,6 +993,8 @@ ANASTASIS_recovery_abort (struct ANASTASIS_Recovery *r)
   {
     GNUNET_free (r->encrypted_recovery_document);
   }
+  if (NULL != r->ri)
+    GNUNET_free (r->ri);
   GNUNET_free (r);
 }
 
diff --git a/src/lib/anastasis_api_redux.c b/src/lib/anastasis_api_redux.c
index 0f3f01d..f034db3 100644
--- a/src/lib/anastasis_api_redux.c
+++ b/src/lib/anastasis_api_redux.c
@@ -1018,25 +1018,12 @@ policy_lookup_cb (void *cls,
     {
       for (unsigned int k = 0; k < rss->challenges_length; k++)
       {
-        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                    "At %s:%d nonce 1 is %s-%llu b\n",
-                    __FILE__,
-                    __LINE__,
-                    TALER_B2S (&ri->dps[i].nonces[j]),
-                    (unsigned long long) sizeof (ri->dps[i].nonces[j]));
-        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                    "At %s:%d nonce 2 is %s-%llu b\n\n",
-                    __FILE__,
-                    __LINE__,
-                    TALER_B2S (rss->challenges[k].nonce),
-                    (unsigned long long) sizeof (*rss->challenges[k].nonce));
-
         if (0 == memcmp (&ri->dps[i].nonces[j],
                          rss->challenges[k].nonce,
                          sizeof (struct ANASTASIS_CRYPTO_NonceP)))
           GNUNET_assert (
-            0 == json_array_append (policy,
-                                    json_integer ((json_int_t) k)));
+            0 == json_array_append_new (policy,
+                                        json_integer ((json_int_t) k)));
       }
     }
     if (0 < json_array_size (policy))
@@ -1066,6 +1053,7 @@ policy_lookup_cb (void *cls,
   }
   else
   {
+    json_decref (recovery_information);
     json_t *error
       = json_pack ("{s:I, s:s}",
                    "code",

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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