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/bank-lib/bank_api_debit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/bank-lib/bank_api_debit.c') diff --git a/src/bank-lib/bank_api_debit.c b/src/bank-lib/bank_api_debit.c index eec4a1df8..9b4e9a494 100644 --- a/src/bank-lib/bank_api_debit.c +++ b/src/bank-lib/bank_api_debit.c @@ -274,7 +274,8 @@ TALER_BANK_debit_history (struct GNUNET_CURL_Context *ctx, "Requesting history at `%s'\n", hh->request_url); eh = curl_easy_init (); - if ( (GNUNET_OK != + if ( (NULL == eh) || + (GNUNET_OK != TALER_BANK_setup_auth_ (eh, auth)) || (CURLE_OK != @@ -284,7 +285,8 @@ TALER_BANK_debit_history (struct GNUNET_CURL_Context *ctx, { GNUNET_break (0); TALER_BANK_debit_history_cancel (hh); - curl_easy_cleanup (eh); + if (NULL != eh) + curl_easy_cleanup (eh); return NULL; } hh->job = GNUNET_CURL_job_add2 (ctx, -- cgit v1.2.3