From 12deb6c2670f663a3c0734e28673f508fffa3210 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 13 Feb 2021 16:24:38 +0100 Subject: fix memory leaks --- src/exchange/taler-exchange-httpd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/exchange/taler-exchange-httpd.c') diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 4208e4ca8..3b8d6ed82 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -381,7 +381,8 @@ proceed_with_handler (const struct TEH_RequestHandler *rh, GNUNET_assert (NULL == root); return MHD_NO; /* bad upload, could not even generate error */ } - if ( (GNUNET_NO == res) || (NULL == root) ) + if ( (GNUNET_NO == res) || + (NULL == root) ) { GNUNET_assert (NULL == root); return MHD_YES; /* so far incomplete upload or parser error */ @@ -427,8 +428,7 @@ proceed_with_handler (const struct TEH_RequestHandler *rh, rh->url, url); GNUNET_break_op (0); - if (NULL != root) - json_decref (root); + json_decref (root); return TALER_MHD_reply_with_error (connection, MHD_HTTP_NOT_FOUND, TALER_EC_EXCHANGE_GENERIC_WRONG_NUMBER_OF_SEGMENTS, @@ -454,8 +454,7 @@ proceed_with_handler (const struct TEH_RequestHandler *rh, connection, args); } - if (NULL != root) - json_decref (root); + json_decref (root); return ret; } -- cgit v1.2.3