From 5017dacbdaac2d1654b01329f97b8b5b7dc34ba9 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 27 Aug 2021 14:35:59 +0200 Subject: -fix memory leak --- src/mhd/mhd_responses.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/mhd/mhd_responses.c') diff --git a/src/mhd/mhd_responses.c b/src/mhd/mhd_responses.c index 6b96de55d..b7ff52e66 100644 --- a/src/mhd/mhd_responses.c +++ b/src/mhd/mhd_responses.c @@ -219,6 +219,21 @@ TALER_MHD_reply_json (struct MHD_Connection *connection, } +MHD_RESULT +TALER_MHD_reply_json_steal (struct MHD_Connection *connection, + json_t *json, + unsigned int response_code) +{ + MHD_RESULT ret; + + ret = TALER_MHD_reply_json (connection, + json, + response_code); + json_decref (json); + return ret; +} + + MHD_RESULT TALER_MHD_reply_cors_preflight (struct MHD_Connection *connection) { -- cgit v1.2.3