From 53c21c441b929c67239f2f5482d5c1df20435af4 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 18 Jan 2020 18:22:10 +0100 Subject: [PATCH] fix leak --- src/exchange/taler-exchange-httpd_refund.c | 2 ++ src/lib/test_taler_exchange_wirewatch.c | 17 ++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/exchange/taler-exchange-httpd_refund.c b/src/exchange/taler-exchange-httpd_refund.c index dd701ebdc..74bfedda0 100644 --- a/src/exchange/taler-exchange-httpd_refund.c +++ b/src/exchange/taler-exchange-httpd_refund.c @@ -317,6 +317,8 @@ refund_transaction (void *cls, &dep->deposit_fee)) ) { GNUNET_break_op (0); /* currency missmatch */ + TEH_plugin->free_coin_transaction_list (TEH_plugin->cls, + tl); *mhd_ret = reply_refund_failure (connection, MHD_HTTP_PRECONDITION_FAILED, TALER_EC_REFUND_CURRENCY_MISSMATCH); diff --git a/src/lib/test_taler_exchange_wirewatch.c b/src/lib/test_taler_exchange_wirewatch.c index dcdb2a61a..9760223d0 100644 --- a/src/lib/test_taler_exchange_wirewatch.c +++ b/src/lib/test_taler_exchange_wirewatch.c @@ -117,7 +117,6 @@ main (int argc, char *const argv[]) { const char *plugin_name; - char *testname; /* these might get in the way */ unsetenv ("XDG_DATA_HOME"); @@ -132,13 +131,17 @@ main (int argc, return -1; } plugin_name++; - (void) GNUNET_asprintf (&testname, - "test-taler-exchange-wirewatch-%s", - plugin_name); - (void) GNUNET_asprintf (&config_filename, - "%s.conf", - testname); + { + char *testname; + GNUNET_asprintf (&testname, + "test-taler-exchange-wirewatch-%s", + plugin_name); + GNUNET_asprintf (&config_filename, + "%s.conf", + testname); + GNUNET_free (testname); + } /* check database is working */ { struct GNUNET_PQ_Context *conn;