summaryrefslogtreecommitdiff
path: root/json-glib
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gmail.com>2022-10-11 14:31:51 +0000
committerEmmanuele Bassi <ebassi@gmail.com>2022-10-11 14:31:51 +0000
commite29cf26dac3b018c245aabf8391d2edff7a2881d (patch)
tree39d3823054af0c396149b9b2bcf50fa7bb93b493 /json-glib
parent6bd106011e75552b97737f31ba79df9d7a695b02 (diff)
parent86d85e9966d5d6283aa0044a6d8430d9ceab8058 (diff)
downloadjson-glib-e29cf26dac3b018c245aabf8391d2edff7a2881d.tar.gz
Merge branch 'fix-deserialize-data-memory-leak' into 'master'
fix deserialize data memory leak See merge request GNOME/json-glib!51
Diffstat (limited to 'json-glib')
-rw-r--r--json-glib/json-gvariant.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/json-glib/json-gvariant.c b/json-glib/json-gvariant.c
index 2af98e7..676064c 100644
--- a/json-glib/json-gvariant.c
+++ b/json-glib/json-gvariant.c
@@ -1319,7 +1319,10 @@ json_gvariant_deserialize_data (const gchar *json,
parser = json_parser_new ();
if (! json_parser_load_from_data (parser, json, length, error))
- return NULL;
+ {
+ g_object_unref (parser);
+ return NULL;
+ }
root = json_parser_get_root (parser);
if (root == NULL)