aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-01-23 17:01:19 +0100
committerChristian Grothoff <christian@grothoff.org>2024-01-23 17:01:19 +0100
commit77319e2020837238142f15e863391a2c45c05161 (patch)
tree144d51ad0330689f62ab5a937f7a406fd1461fa3 /src
parent3f88a5c66599224967f66ccf7d4edb8a8df2268a (diff)
fix #8221
Diffstat (limited to 'src')
-rw-r--r--src/lib/exchange_api_purse_create_with_deposit.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/exchange_api_purse_create_with_deposit.c b/src/lib/exchange_api_purse_create_with_deposit.c
index fc2499338..fff898e57 100644
--- a/src/lib/exchange_api_purse_create_with_deposit.c
+++ b/src/lib/exchange_api_purse_create_with_deposit.c
@@ -512,6 +512,10 @@ TALER_EXCHANGE_purse_create_with_deposit (
&attest))
{
GNUNET_break (0);
+ GNUNET_array_grow (pch->deposits,
+ pch->num_deposits,
+ 0);
+ GNUNET_free (pch->url);
json_decref (deposit_arr);
GNUNET_free (pch);
return NULL;
@@ -606,7 +610,9 @@ TALER_EXCHANGE_purse_create_with_deposit (
curl_easy_cleanup (eh);
json_decref (create_obj);
GNUNET_free (pch->econtract.econtract);
- GNUNET_free (pch->deposits);
+ GNUNET_array_grow (pch->deposits,
+ pch->num_deposits,
+ 0);
GNUNET_free (pch->url);
GNUNET_free (pch);
return NULL;
@@ -638,7 +644,9 @@ TALER_EXCHANGE_purse_create_with_deposit_cancel (
GNUNET_free (pch->econtract.econtract);
GNUNET_free (pch->exchange_url);
GNUNET_free (pch->url);
- GNUNET_free (pch->deposits);
+ GNUNET_array_grow (pch->deposits,
+ pch->num_deposits,
+ 0);
TALER_EXCHANGE_keys_decref (pch->keys);
TALER_curl_easy_post_finished (&pch->ctx);
GNUNET_free (pch);