From b9a30d29cb91ec66c3bb8d956640d20e641b6a4d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 7 Jun 2022 15:02:08 +0200 Subject: -fix minor bugs --- src/lib/exchange_api_management_revoke_denomination_key.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/lib/exchange_api_management_revoke_denomination_key.c') diff --git a/src/lib/exchange_api_management_revoke_denomination_key.c b/src/lib/exchange_api_management_revoke_denomination_key.c index f7ddeaed2..8d65b6451 100644 --- a/src/lib/exchange_api_management_revoke_denomination_key.c +++ b/src/lib/exchange_api_management_revoke_denomination_key.c @@ -175,15 +175,17 @@ TALER_EXCHANGE_management_revoke_denomination_key ( return NULL; } eh = TALER_EXCHANGE_curl_easy_get_ (rh->url); - if (GNUNET_OK != - TALER_curl_easy_post (&rh->post_ctx, - eh, - body)) + if ( (NULL == eh) || + (GNUNET_OK != + TALER_curl_easy_post (&rh->post_ctx, + eh, + body)) ) { GNUNET_break (0); + if (NULL != eh) + curl_easy_cleanup (eh); json_decref (body); GNUNET_free (rh->url); - GNUNET_free (eh); return NULL; } json_decref (body); -- cgit v1.2.3