From be055f1b9274c6a142fcba4f3687b5aa1532a379 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 19 Oct 2016 00:09:10 +0200 Subject: [PATCH] fix recently introduced double-free --- src/exchange-lib/exchange_api_common.c | 4 ++-- src/exchange/taler-exchange-httpd_deposit.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/exchange-lib/exchange_api_common.c b/src/exchange-lib/exchange_api_common.c index acf90fce6..e6ab2cbc2 100644 --- a/src/exchange-lib/exchange_api_common.c +++ b/src/exchange-lib/exchange_api_common.c @@ -38,8 +38,8 @@ */ int TALER_EXCHANGE_verify_coin_history (const char *currency, - const struct TALER_CoinSpendPublicKeyP *coin_pub, - json_t *history, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + json_t *history, struct TALER_Amount *total) { size_t len; diff --git a/src/exchange/taler-exchange-httpd_deposit.c b/src/exchange/taler-exchange-httpd_deposit.c index 1784f6fdf..b0ab42e7f 100644 --- a/src/exchange/taler-exchange-httpd_deposit.c +++ b/src/exchange/taler-exchange-httpd_deposit.c @@ -218,11 +218,11 @@ TEH_DEPOSIT_handler_deposit (struct TEH_RequestHandler *rh, if (0 < TALER_amount_cmp (&deposit.deposit_fee, &deposit.amount_with_fee)) { + GNUNET_break_op (0); return TEH_RESPONSE_reply_external_error (connection, TALER_EC_DEPOSIT_NEGATIVE_VALUE_AFTER_FEE, "deposited amount smaller than depositing fee"); } - TEH_KS_release (key_state); res = verify_and_execute_deposit (connection, &deposit);