gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: [pq] free signatures in arrays o


From: gnunet
Subject: [taler-exchange] branch master updated: [pq] free signatures in arrays of blinded denomination signatures
Date: Thu, 09 Nov 2023 19:53:38 +0100

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

oec pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 5d9740f6 [pq] free signatures in arrays of blinded denomination 
signatures
5d9740f6 is described below

commit 5d9740f69ec9faeb93e8545dc84855bbaeaeecf3
Author: Özgür Kesim <oec-taler@kesim.org>
AuthorDate: Thu Nov 9 19:53:31 2023 +0100

    [pq] free signatures in arrays of blinded denomination signatures
---
 src/pq/pq_result_helper.c | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c
index 6f433866..9acf8071 100644
--- a/src/pq/pq_result_helper.c
+++ b/src/pq/pq_result_helper.c
@@ -1141,13 +1141,13 @@ extract_array_generic (
   *((void **) dst) = NULL;
 
   #define FAIL_IF(cond) \
-  do { \
-    if ((cond)) \
-    { \
-      GNUNET_break (! (cond)); \
-      goto FAIL; \
-    } \
-  } while (0)
+          do { \
+            if ((cond)) \
+            { \
+              GNUNET_break (! (cond)); \
+              goto FAIL; \
+            } \
+          } while (0)
 
   col_num = PQfnumber (result, fname);
   FAIL_IF (0 > col_num);
@@ -1365,12 +1365,19 @@ array_cleanup (void *cls,
   struct ArrayResultCls *info = cls;
   void **dst = rd;
 
-  /* FIXME-Oec: this does not properly clean up
-     denomination signatures! */
   if ((0 == info->same_size) &&
       (NULL != info->sizes))
     GNUNET_free (*(info->sizes));
 
+  /* Clean up signatures, if applicable */
+  if (TALER_PQ_array_of_blinded_denom_sig == info->typ)
+  {
+    struct TALER_BlindedDenominationSignature *denom_sigs = *dst;
+    GNUNET_assert (NULL != info->num);
+    for (size_t i = 0; i < *info->num; i++)
+      GNUNET_free (denom_sigs[i].blinded_sig);
+  }
+
   GNUNET_free (cls);
   GNUNET_free (*dst);
   *dst = NULL;

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