From a9b3c564bdd80ad6d3db0d0c493144956c64368d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 3 Mar 2020 17:14:00 +0100 Subject: rename BANK_excecute_wire_transfer to BANK_transfer, improve error handling when curl_easy_init() fails --- src/lib/exchange_api_recoup.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/lib/exchange_api_recoup.c') diff --git a/src/lib/exchange_api_recoup.c b/src/lib/exchange_api_recoup.c index 013d480b0..5a2759356 100644 --- a/src/lib/exchange_api_recoup.c +++ b/src/lib/exchange_api_recoup.c @@ -390,13 +390,15 @@ TALER_EXCHANGE_recoup (struct TALER_EXCHANGE_Handle *exchange, arg_str); ph->was_refreshed = was_refreshed; eh = TALER_EXCHANGE_curl_easy_get_ (ph->url); - if (GNUNET_OK != - TALER_curl_easy_post (&ph->ctx, - eh, - recoup_obj)) + if ( (NULL == eh) || + (GNUNET_OK != + TALER_curl_easy_post (&ph->ctx, + eh, + recoup_obj)) ) { GNUNET_break (0); - curl_easy_cleanup (eh); + if (NULL != eh) + curl_easy_cleanup (eh); json_decref (recoup_obj); GNUNET_free (ph->url); GNUNET_free (ph); -- cgit v1.2.3