diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-02-13 19:21:11 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-02-13 19:21:11 +0100 |
commit | 2407145b0e0e676ffda3c415448666deae5ae8a3 (patch) | |
tree | b50b30a0e10624b4406ec376db202b870f8b1b5c /src | |
parent | 4241d0d9a0911139c635f2ae2d5143d6bad281c2 (diff) | |
download | merchant-2407145b0e0e676ffda3c415448666deae5ae8a3.tar.gz merchant-2407145b0e0e676ffda3c415448666deae5ae8a3.tar.bz2 merchant-2407145b0e0e676ffda3c415448666deae5ae8a3.zip |
fix memory leak
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-get-products-ID.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/backend/taler-merchant-httpd_private-get-products-ID.c b/src/backend/taler-merchant-httpd_private-get-products-ID.c index 915b016c..0fc666eb 100644 --- a/src/backend/taler-merchant-httpd_private-get-products-ID.c +++ b/src/backend/taler-merchant-httpd_private-get-products-ID.c @@ -62,6 +62,7 @@ TMH_private_get_products_ID (const struct TMH_RequestHandler *rh, } { json_t *reply; + MHD_RESULT ret; reply = json_pack ( "{s:s, s:s, s:o, s:o, s:I," @@ -95,9 +96,11 @@ TMH_private_get_products_ID (const struct TMH_RequestHandler *rh, json_object_set_new (reply, "next_restock", GNUNET_JSON_from_time_abs (pd.next_restock)); - return TALER_MHD_reply_json (connection, - reply, - MHD_HTTP_OK); + ret = TALER_MHD_reply_json (connection, + reply, + MHD_HTTP_OK); + json_decref (reply); + return ret; } } |