summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_deposit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/exchange_api_deposit.c')
-rw-r--r--src/lib/exchange_api_deposit.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/exchange_api_deposit.c b/src/lib/exchange_api_deposit.c
index 24b9f6fed..928a378b2 100644
--- a/src/lib/exchange_api_deposit.c
+++ b/src/lib/exchange_api_deposit.c
@@ -627,13 +627,15 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
not copy the pointer */
eh = TALER_EXCHANGE_curl_easy_get_ (dh->url);
- if (GNUNET_OK !=
- TALER_curl_easy_post (&dh->ctx,
- eh,
- deposit_obj))
+ if ( (NULL == eh) ||
+ (GNUNET_OK !=
+ TALER_curl_easy_post (&dh->ctx,
+ eh,
+ deposit_obj)) )
{
GNUNET_break (0);
- curl_easy_cleanup (eh);
+ if (NULL != eh)
+ curl_easy_cleanup (eh);
json_decref (deposit_obj);
GNUNET_free (dh->url);
GNUNET_free (dh);