diff options
Diffstat (limited to 'src/lib/exchange_api_recoup.c')
-rw-r--r-- | src/lib/exchange_api_recoup.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/exchange_api_recoup.c b/src/lib/exchange_api_recoup.c index 013d480b0..5a2759356 100644 --- a/src/lib/exchange_api_recoup.c +++ b/src/lib/exchange_api_recoup.c @@ -390,13 +390,15 @@ TALER_EXCHANGE_recoup (struct TALER_EXCHANGE_Handle *exchange, arg_str); ph->was_refreshed = was_refreshed; eh = TALER_EXCHANGE_curl_easy_get_ (ph->url); - if (GNUNET_OK != - TALER_curl_easy_post (&ph->ctx, - eh, - recoup_obj)) + if ( (NULL == eh) || + (GNUNET_OK != + TALER_curl_easy_post (&ph->ctx, + eh, + recoup_obj)) ) { GNUNET_break (0); - curl_easy_cleanup (eh); + if (NULL != eh) + curl_easy_cleanup (eh); json_decref (recoup_obj); GNUNET_free (ph->url); GNUNET_free (ph); |