summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-19 22:23:57 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-19 22:24:04 +0100
commite46467510daf1dc55b9d01fcca42eb9912492133 (patch)
tree34b5a30b977ae003afe5b8f55d2ab58ee9d40ffa /src/testing
parent12468e1fd89748aaa4b1d31052e97e2436b763c4 (diff)
downloadexchange-e46467510daf1dc55b9d01fcca42eb9912492133.tar.gz
exchange-e46467510daf1dc55b9d01fcca42eb9912492133.tar.bz2
exchange-e46467510daf1dc55b9d01fcca42eb9912492133.zip
leak fixes
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing_api_cmd_withdraw.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/testing/testing_api_cmd_withdraw.c b/src/testing/testing_api_cmd_withdraw.c
index b62420557..207d11876 100644
--- a/src/testing/testing_api_cmd_withdraw.c
+++ b/src/testing/testing_api_cmd_withdraw.c
@@ -263,23 +263,23 @@ withdraw_run (void *cls,
}
TALER_planchet_setup_random (&ws->ps);
ws->is = is;
-
- dpk = TALER_TESTING_find_pk (TALER_EXCHANGE_get_keys (is->exchange),
- &ws->amount);
- if (NULL == dpk)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Failed to determine denomination key at %s\n",
- (NULL != cmd) ? cmd->label : "<retried command>");
- GNUNET_assert (0);
- }
- else
+ if (NULL == ws->pk)
{
+ dpk = TALER_TESTING_find_pk (TALER_EXCHANGE_get_keys (is->exchange),
+ &ws->amount);
+ if (NULL == dpk)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to determine denomination key at %s\n",
+ (NULL != cmd) ? cmd->label : "<retried command>");
+ GNUNET_break (0);
+ TALER_TESTING_interpreter_fail (is);
+ return;
+ }
/* We copy the denomination key, as re-querying /keys
* would free the old one. */
ws->pk = TALER_EXCHANGE_copy_denomination_key (dpk);
}
-
ws->wsh = TALER_EXCHANGE_reserve_withdraw (is->exchange,
ws->pk,
rp,