aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/json.c
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2023-12-27 16:13:55 +0100
committerEgor Tensin <egor@tensin.name>2023-12-27 16:13:55 +0100
commit161824050964f191315928e6d598bc584ec7cb7b (patch)
tree50934331061fad0e1da8b8741d8a09bf0907e17c /src/json.c
parentdocker: bump base image (diff)
downloadcimple-161824050964f191315928e6d598bc584ec7cb7b.tar.gz
cimple-161824050964f191315928e6d598bc584ec7cb7b.zip
json: factor out json_object_put into json_free
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/json.c b/src/json.c
index 2e0a6bb..9a38e4e 100644
--- a/src/json.c
+++ b/src/json.c
@@ -18,6 +18,11 @@
#include <stdlib.h>
#include <string.h>
+void json_free(struct json_object *obj)
+{
+ json_object_put(obj);
+}
+
static const char *json_to_string_internal(struct json_object *obj, int flags)
{
const char *result = json_object_to_json_string_ext(obj, flags);