commit c85e4757f3a0b10653f281a04894321a954e666b
parent 5bce2b2abe7522152a76744aacc79c662b67dfeb
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 21 Dec 2025 21:32:33 +0100
-fix minor leak in tests
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c
@@ -2008,7 +2008,7 @@ TALER_EXCHANGE_keys_decref (struct TALER_EXCHANGE_Keys *keys)
0);
for (unsigned int i = 0; i<keys->num_denom_keys; i++)
TALER_denom_pub_free (&keys->denom_keys[i].key);
-
+ keys->num_denom_keys = 0;
GNUNET_array_grow (keys->denom_keys,
keys->denom_keys_size,
0);
diff --git a/src/testing/testing_api_cmd_batch_withdraw.c b/src/testing/testing_api_cmd_batch_withdraw.c
@@ -254,7 +254,6 @@ batch_withdraw_run (void *cls,
struct TALER_EXCHANGE_DenomPublicKey denoms_pub[ws->num_coins];
struct TALER_PlanchetMasterSecretP secrets[ws->num_coins];
-
(void) cmd;
ws->is = is;
create_reserve
@@ -286,7 +285,6 @@ batch_withdraw_run (void *cls,
= TALER_reserve_make_payto (ws->exchange_url,
&ws->reserve_pub);
-
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
&ws->seed,
sizeof(ws->seed));
@@ -372,6 +370,8 @@ batch_withdraw_run (void *cls,
0,
&batch_withdraw_cb,
ws);
+ for (unsigned int i = 0; i<ws->num_coins; i++)
+ TALER_denom_pub_free (&denoms_pub[i].key);
if (NULL == ws->wsh)
{
GNUNET_break (0);