diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-06-29 14:06:37 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-06-29 14:06:37 +0200 |
commit | 9902e88b2d9dceb948275cf17b7ff62002da6fe3 (patch) | |
tree | cf38dd51ee4b929a3d41b500193d795ed197d1ff /src/exchange/taler-exchange-httpd_purses_deposit.c | |
parent | 60a30b1c75644710d635c2efa4bccf440e1839b4 (diff) |
-fix leaks
Diffstat (limited to 'src/exchange/taler-exchange-httpd_purses_deposit.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_purses_deposit.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_purses_deposit.c b/src/exchange/taler-exchange-httpd_purses_deposit.c index 87e2f568..059ff03e 100644 --- a/src/exchange/taler-exchange-httpd_purses_deposit.c +++ b/src/exchange/taler-exchange-httpd_purses_deposit.c @@ -415,6 +415,8 @@ TEH_handler_purses_deposit ( if (GNUNET_OK != res) { GNUNET_JSON_parse_free (spec); + for (unsigned int i = 0; i<idx; i++) + TEH_common_deposit_free_coin (&pcc.coins[i]); GNUNET_free (pcc.coins); return (GNUNET_NO == res) ? MHD_YES : MHD_NO; } @@ -425,6 +427,8 @@ TEH_handler_purses_deposit ( { GNUNET_break (0); GNUNET_JSON_parse_free (spec); + for (unsigned int i = 0; i<pcc.num_coins; i++) + TEH_common_deposit_free_coin (&pcc.coins[i]); GNUNET_free (pcc.coins); return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, @@ -445,6 +449,8 @@ TEH_handler_purses_deposit ( &pcc)) { GNUNET_JSON_parse_free (spec); + for (unsigned int i = 0; i<pcc.num_coins; i++) + TEH_common_deposit_free_coin (&pcc.coins[i]); GNUNET_free (pcc.coins); return mhd_ret; } @@ -471,6 +477,8 @@ TEH_handler_purses_deposit ( res = reply_deposit_success (connection, &pcc); + for (unsigned int i = 0; i<pcc.num_coins; i++) + TEH_common_deposit_free_coin (&pcc.coins[i]); GNUNET_free (pcc.coins); GNUNET_JSON_parse_free (spec); return res; |