summaryrefslogtreecommitdiff
path: root/src/bank-lib/bank_api_debit.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-03 17:14:00 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-03 17:14:00 +0100
commita9b3c564bdd80ad6d3db0d0c493144956c64368d (patch)
tree0d6b2e480eb87802f26d2c323d07d8a89b8f7268 /src/bank-lib/bank_api_debit.c
parent97fb6b0091ca089b997febf691be2038223a8d21 (diff)
downloadexchange-a9b3c564bdd80ad6d3db0d0c493144956c64368d.tar.gz
exchange-a9b3c564bdd80ad6d3db0d0c493144956c64368d.tar.bz2
exchange-a9b3c564bdd80ad6d3db0d0c493144956c64368d.zip
rename BANK_excecute_wire_transfer to BANK_transfer, improve error handling when curl_easy_init() fails
Diffstat (limited to 'src/bank-lib/bank_api_debit.c')
-rw-r--r--src/bank-lib/bank_api_debit.c6
1 files changed, 4 insertions, 2 deletions
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,