summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-02-13 16:24:38 +0100
committerChristian Grothoff <christian@grothoff.org>2021-02-13 16:24:38 +0100
commit12deb6c2670f663a3c0734e28673f508fffa3210 (patch)
tree0ca246a3b65bf20c541859882edb74225db4a3df /src/exchange/taler-exchange-httpd.c
parentcd17d095e8d542d6cef854e8394472364e9a01b9 (diff)
downloadexchange-12deb6c2670f663a3c0734e28673f508fffa3210.tar.gz
exchange-12deb6c2670f663a3c0734e28673f508fffa3210.tar.bz2
exchange-12deb6c2670f663a3c0734e28673f508fffa3210.zip
fix memory leaks
Diffstat (limited to 'src/exchange/taler-exchange-httpd.c')
-rw-r--r--src/exchange/taler-exchange-httpd.c9
1 files changed, 4 insertions, 5 deletions
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;
}