summaryrefslogtreecommitdiff
path: root/src/bank-lib/bank_api_credit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bank-lib/bank_api_credit.c')
-rw-r--r--src/bank-lib/bank_api_credit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bank-lib/bank_api_credit.c b/src/bank-lib/bank_api_credit.c
index be5b1908e..bb0d86631 100644
--- a/src/bank-lib/bank_api_credit.c
+++ b/src/bank-lib/bank_api_credit.c
@@ -276,7 +276,8 @@ TALER_BANK_credit_history (struct GNUNET_CURL_Context *ctx,
"Requesting credit 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 !=
@@ -286,7 +287,8 @@ TALER_BANK_credit_history (struct GNUNET_CURL_Context *ctx,
{
GNUNET_break (0);
TALER_BANK_credit_history_cancel (hh);
- curl_easy_cleanup (eh);
+ if (NULL != eh)
+ curl_easy_cleanup (eh);
return NULL;
}
hh->job = GNUNET_CURL_job_add2 (ctx,