exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 659fa343d8634b0d81e77f69f44278aa145242a8
parent b528658955cfef0a8d768e75285455ad9a9acde0
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 11 Oct 2026 14:52:20 +0200

fix leaks

Diffstat:
Msrc/lib/exchange_api_post-purses-PURSE_PUB-create.c | 6++++++
Msrc/lib/exchange_api_post-reserves-RESERVE_PUB-purse.c | 3+++
Msrc/lib/exchange_api_restrictions.c | 1+
3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/lib/exchange_api_post-purses-PURSE_PUB-create.c b/src/lib/exchange_api_post-purses-PURSE_PUB-create.c @@ -551,6 +551,7 @@ TALER_EXCHANGE_post_purses_create_create ( NULL, NULL)) { GNUNET_break (0); + json_decref (pch->contract_terms); GNUNET_free (pch->base_url); GNUNET_free (pch); return NULL; @@ -561,6 +562,7 @@ TALER_EXCHANGE_post_purses_create_create ( &pch->h_contract_terms)) { GNUNET_break (0); + json_decref (pch->contract_terms); GNUNET_free (pch->base_url); GNUNET_free (pch); return NULL; @@ -592,9 +594,12 @@ TALER_EXCHANGE_post_purses_create_create ( &d->attest)) { GNUNET_break (0); + for (unsigned int j = 0; j<i; j++) + TALER_denom_sig_free (&pch->deposits[j].denom_sig); GNUNET_array_grow (pch->deposits, pch->num_deposits, 0); + json_decref (pch->contract_terms); GNUNET_free (pch->base_url); GNUNET_free (pch); return NULL; @@ -768,6 +773,7 @@ TALER_EXCHANGE_post_purses_create_start ( if (NULL == pch->url) { GNUNET_break (0); + json_decref (body); return TALER_EC_GENERIC_CONFIGURATION_INVALID; } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, diff --git a/src/lib/exchange_api_post-reserves-RESERVE_PUB-purse.c b/src/lib/exchange_api_post-reserves-RESERVE_PUB-purse.c @@ -413,6 +413,7 @@ TALER_EXCHANGE_post_reserves_purse_create ( { GNUNET_break (0); TALER_EXCHANGE_keys_decref (prph->keys); + json_decref (prph->contract_terms); GNUNET_free (prph->base_url); GNUNET_free (prph->exchange_url); GNUNET_free (prph); @@ -446,6 +447,7 @@ TALER_EXCHANGE_post_reserves_purse_create ( { GNUNET_break (0); TALER_EXCHANGE_keys_decref (prph->keys); + json_decref (prph->contract_terms); GNUNET_free (prph->base_url); GNUNET_free (prph->exchange_url); GNUNET_free (prph); @@ -618,6 +620,7 @@ TALER_EXCHANGE_post_reserves_purse_start ( if (NULL == prph->url) { GNUNET_break (0); + json_decref (body); return TALER_EC_GENERIC_CONFIGURATION_INVALID; } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, diff --git a/src/lib/exchange_api_restrictions.c b/src/lib/exchange_api_restrictions.c @@ -51,6 +51,7 @@ TALER_EXCHANGE_test_account_allowed ( if (NULL == wm2) { GNUNET_break (0); + GNUNET_free (wm1); return GNUNET_SYSERR; } ok = (0 == strcmp (wm1,