aboutsummaryrefslogtreecommitdiff
path: root/src/exchange-lib/testing_api_cmd_withdraw.c
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-03-21 14:24:57 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2018-03-21 17:13:26 +0100
commit7d4d3b3e9de03f6888647ed61c4156d392fcc640 (patch)
tree422f96cd2cabb7ba6ab28fd5ac6a5f1d34e143c9 /src/exchange-lib/testing_api_cmd_withdraw.c
parente364aa76e1325db339c3ecfab3a3d7155c4c911f (diff)
downloadexchange-7d4d3b3e9de03f6888647ed61c4156d392fcc640.tar.xz
address leaks.
Diffstat (limited to 'src/exchange-lib/testing_api_cmd_withdraw.c')
-rw-r--r--src/exchange-lib/testing_api_cmd_withdraw.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/exchange-lib/testing_api_cmd_withdraw.c b/src/exchange-lib/testing_api_cmd_withdraw.c
index 07dad69eb..3584cbde3 100644
--- a/src/exchange-lib/testing_api_cmd_withdraw.c
+++ b/src/exchange-lib/testing_api_cmd_withdraw.c
@@ -58,6 +58,11 @@ struct WithdrawState
struct TALER_EXCHANGE_Handle *exchange;
/**
+ * Exchange base URL.
+ */
+ char *exchange_url;
+
+ /**
* Interpreter state (during command).
*/
struct TALER_TESTING_Interpreter *is;
@@ -229,6 +234,7 @@ withdraw_cleanup (void *cls,
GNUNET_CRYPTO_rsa_signature_free (ws->sig.rsa_signature);
ws->sig.rsa_signature = NULL;
}
+ GNUNET_free_non_null (ws->exchange_url);
GNUNET_free (ws);
}
@@ -274,6 +280,7 @@ withdraw_traits (void *cls,
TALER_TESTING_interpreter_fail (ws->is);
return GNUNET_SYSERR;
}
+ ws->exchange_url = MAH_path_to_url (ws->exchange, "/");
struct TALER_TESTING_Trait traits[] = {
TALER_TESTING_make_trait_coin_priv (0 /* only one coin */,
@@ -288,8 +295,7 @@ withdraw_traits (void *cls,
reserve_priv),
TALER_TESTING_make_trait_amount_obj (0,
&ws->amount),
- TALER_TESTING_make_trait_url (
- 0, MAH_path_to_url (ws->exchange, "/")),
+ TALER_TESTING_make_trait_url (0, ws->exchange_url),
TALER_TESTING_trait_end ()
};