diff options
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 87e2f5689..059ff03e3 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; |