From 5026518bb5a6c47b9278eede81989ca0fba7094a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 27 Aug 2021 16:17:45 +0200 Subject: -fix another leak --- src/include/taler_mhd_lib.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/taler_mhd_lib.h b/src/include/taler_mhd_lib.h index aba7cd8e2..ba5a072c4 100644 --- a/src/include/taler_mhd_lib.h +++ b/src/include/taler_mhd_lib.h @@ -211,6 +211,16 @@ struct MHD_Response * TALER_MHD_make_json (const json_t *json); +/** + * Make JSON response object and free @a json. + * + * @param json the json object, freed. + * @return MHD response object + */ +struct MHD_Response * +TALER_MHD_make_json_steal (json_t *json); + + /** * Make JSON response object. * @@ -230,7 +240,7 @@ TALER_MHD_make_json_pack (const char *fmt, * @return MHD response object */ #define TALER_MHD_MAKE_JSON_PACK(...) \ - TALER_MHD_make_json (GNUNET_JSON_PACK (__VA_ARGS__)) + TALER_MHD_make_json_steal (GNUNET_JSON_PACK (__VA_ARGS__)) /** -- cgit v1.2.3