[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: -fix another leak
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: -fix another leak |
Date: |
Fri, 27 Aug 2021 16:17:47 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 5026518b -fix another leak
5026518b is described below
commit 5026518bb5a6c47b9278eede81989ca0fba7094a
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Aug 27 16:17:45 2021 +0200
-fix another leak
---
src/include/taler_mhd_lib.h | 12 +++++++++++-
src/mhd/mhd_responses.c | 11 +++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/src/include/taler_mhd_lib.h b/src/include/taler_mhd_lib.h
index aba7cd8e..ba5a072c 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__))
/**
diff --git a/src/mhd/mhd_responses.c b/src/mhd/mhd_responses.c
index b7ff52e6..c993436c 100644
--- a/src/mhd/mhd_responses.c
+++ b/src/mhd/mhd_responses.c
@@ -148,6 +148,17 @@ TALER_MHD_make_json (const json_t *json)
}
+struct MHD_Response *
+TALER_MHD_make_json_steal (json_t *json)
+{
+ struct MHD_Response *res;
+
+ res = TALER_MHD_make_json (json);
+ json_decref (json);
+ return res;
+}
+
+
MHD_RESULT
TALER_MHD_reply_json (struct MHD_Connection *connection,
const json_t *json,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: -fix another leak,
gnunet <=