summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_refund.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/lib/exchange_api_refund.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/lib/exchange_api_refund.c')
-rw-r--r--src/lib/exchange_api_refund.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/exchange_api_refund.c b/src/lib/exchange_api_refund.c
index 8c50c80b..d14481e7 100644
--- a/src/lib/exchange_api_refund.c
+++ b/src/lib/exchange_api_refund.c
@@ -388,13 +388,15 @@ TALER_EXCHANGE_refund2 (struct TALER_EXCHANGE_Handle *exchange,
refund_fee);
eh = TALER_EXCHANGE_curl_easy_get_ (rh->url);
- if (GNUNET_OK !=
- TALER_curl_easy_post (&rh->ctx,
- eh,
- refund_obj))
+ if ( (NULL == eh) ||
+ (GNUNET_OK !=
+ TALER_curl_easy_post (&rh->ctx,
+ eh,
+ refund_obj)) )
{
GNUNET_break (0);
- curl_easy_cleanup (eh);
+ if (NULL != eh)
+ curl_easy_cleanup (eh);
json_decref (refund_obj);
GNUNET_free (rh->url);
GNUNET_free (rh);