diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-09-24 12:51:16 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-09-24 12:51:16 +0200 |
commit | cb60a5695d330de0feea2fb4800ca853a8ffe0ed (patch) | |
tree | e60df7d604f0e862da3b5bc60de33f2ee6fd4aa0 | |
parent | 7cab961e2d51286684dc8d12a134194f1baa9b44 (diff) |
-fix regression
-rw-r--r-- | src/exchange/taler-exchange-httpd_batch-deposit.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/exchange/taler-exchange-httpd_batch-deposit.c b/src/exchange/taler-exchange-httpd_batch-deposit.c index a8bf40d2b..894f8fb4e 100644 --- a/src/exchange/taler-exchange-httpd_batch-deposit.c +++ b/src/exchange/taler-exchange-httpd_batch-deposit.c @@ -643,10 +643,11 @@ TEH_handler_batch_deposit (struct TEH_RequestContext *rc, GNUNET_NZL (bd->num_cdis)]; struct TALER_Amount deposit_fees[GNUNET_NZL (bd->num_cdis)]; enum GNUNET_GenericReturnValue res; + unsigned int i; bd->cdis = cdis; dc.deposit_fees = deposit_fees; - for (unsigned int i = 0; i<bd->num_cdis; i++) + for (i = 0; i<bd->num_cdis; i++) { struct TALER_Amount amount_without_fee; @@ -668,13 +669,13 @@ TEH_handler_batch_deposit (struct TEH_RequestContext *rc, &dc.policy_details.accumulated_total, &dc.policy_details.accumulated_total, &amount_without_fee)); - if (GNUNET_OK != res) - { - for (unsigned int j = 0; j<i; j++) - TALER_denom_sig_free (&cdis[j].coin.denom_sig); - GNUNET_JSON_parse_free (spec); - return (GNUNET_NO == res) ? MHD_YES : MHD_NO; - } + } + if (GNUNET_OK != res) + { + for (unsigned int j = 0; j<i; j++) + TALER_denom_sig_free (&cdis[j].coin.denom_sig); + GNUNET_JSON_parse_free (spec); + return (GNUNET_NO == res) ? MHD_YES : MHD_NO; } dc.exchange_timestamp = GNUNET_TIME_timestamp_get (); |