gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: -more leaks


From: gnunet
Subject: [taler-anastasis] branch master updated: -more leaks
Date: Fri, 27 Aug 2021 15:53:16 +0200

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

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 8dcf113  -more leaks
8dcf113 is described below

commit 8dcf1134d4b9ce76baf9d7c3bd33a555a32f558e
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Aug 27 15:53:14 2021 +0200

    -more leaks
---
 src/reducer/anastasis_api_backup_redux.c | 13 +++++++++----
 src/reducer/anastasis_api_redux.c        |  6 +++++-
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/reducer/anastasis_api_backup_redux.c 
b/src/reducer/anastasis_api_backup_redux.c
index e025810..c8c0404 100644
--- a/src/reducer/anastasis_api_backup_redux.c
+++ b/src/reducer/anastasis_api_backup_redux.c
@@ -667,10 +667,13 @@ struct PolicyBuilder
 static void
 free_costs (struct Costs *costs)
 {
-  if (NULL == costs)
-    return;
-  free_costs (costs->next);
-  GNUNET_free (costs);
+  while (NULL != costs)
+  {
+    struct Costs *next = costs->next;
+
+    GNUNET_free (costs);
+    costs = next;
+  }
 }
 
 
@@ -1548,6 +1551,8 @@ clean_pb (struct PolicyBuilder *pb)
       GNUNET_CONTAINER_DLL_remove (p->pm_head,
                                    p->pm_tail,
                                    pm);
+      for (unsigned int i = 0; i<pb->req_methods; i++)
+        free_costs (pm->providers[i].usage_fee);
       GNUNET_free (pm->providers);
       GNUNET_free (pm);
     }
diff --git a/src/reducer/anastasis_api_redux.c 
b/src/reducer/anastasis_api_redux.c
index 6262033..f55eece 100644
--- a/src/reducer/anastasis_api_redux.c
+++ b/src/reducer/anastasis_api_redux.c
@@ -349,7 +349,6 @@ free_config_request (struct ConfigRequest *cr)
   GNUNET_free (cr->business_name);
   for (unsigned int i = 0; i<cr->methods_length; i++)
     GNUNET_free (cr->methods[i].type);
-  GNUNET_free (cr->business_name);
   GNUNET_free (cr->methods);
   GNUNET_free (cr);
 }
@@ -571,8 +570,13 @@ config_cb (void *cls,
     }
     else
     {
+      GNUNET_free (cr->currency);
       cr->currency = GNUNET_strdup (acfg->currency);
+      GNUNET_free (cr->business_name);
       cr->business_name = GNUNET_strdup (acfg->business_name);
+      for (unsigned int i = 0; i<cr->methods_length; i++)
+        GNUNET_free (cr->methods[i].type);
+      GNUNET_free (cr->methods);
       cr->methods = GNUNET_new_array (acfg->methods_length,
                                       struct AuthorizationMethodConfig);
       for (unsigned int i = 0; i<acfg->methods_length; i++)

-- 
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]