fix memory leak if traits are requested multiple times per withdraw

This commit is contained in:
Christian Grothoff 2019-02-17 00:18:04 +01:00
parent 3ff5bad33e
commit 70e7bc1184
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -365,9 +365,9 @@ withdraw_traits (void *cls,
TALER_TESTING_interpreter_fail (ws->is);
return GNUNET_SYSERR;
}
ws->exchange_url = GNUNET_strdup
(TALER_EXCHANGE_get_base_url (ws->is->exchange));
if (NULL == ws->exchange_url)
ws->exchange_url
= GNUNET_strdup (TALER_EXCHANGE_get_base_url (ws->is->exchange));
struct TALER_TESTING_Trait traits[] = {
TALER_TESTING_make_trait_coin_priv (0 /* only one coin */,
@ -383,7 +383,6 @@ withdraw_traits (void *cls,
TALER_TESTING_make_trait_amount_obj (0,
&ws->amount),
TALER_TESTING_make_trait_url (0, ws->exchange_url),
TALER_TESTING_trait_end ()
};