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_post_keys.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/lib/exchange_api_management_post_keys.c') diff --git a/src/lib/exchange_api_management_post_keys.c b/src/lib/exchange_api_management_post_keys.c index d7790599a..291c0ac02 100644 --- a/src/lib/exchange_api_management_post_keys.c +++ b/src/lib/exchange_api_management_post_keys.c @@ -191,16 +191,17 @@ TALER_EXCHANGE_post_management_keys ( GNUNET_JSON_pack_array_steal ("signkey_sigs", signkey_sigs)); eh = TALER_EXCHANGE_curl_easy_get_ (ph->url); - GNUNET_assert (NULL != eh); - if (GNUNET_OK != - TALER_curl_easy_post (&ph->post_ctx, - eh, - body)) + if ( (NULL == eh) || + (GNUNET_OK != + TALER_curl_easy_post (&ph->post_ctx, + eh, + body)) ) { GNUNET_break (0); + if (NULL != eh) + curl_easy_cleanup (eh); json_decref (body); GNUNET_free (ph->url); - GNUNET_free (eh); return NULL; } json_decref (body); -- cgit v1.2.3