diff options
author | Emmanuele Bassi <ebassi@gmail.com> | 2022-10-11 14:31:51 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gmail.com> | 2022-10-11 14:31:51 +0000 |
commit | e29cf26dac3b018c245aabf8391d2edff7a2881d (patch) | |
tree | 39d3823054af0c396149b9b2bcf50fa7bb93b493 /json-glib | |
parent | 6bd106011e75552b97737f31ba79df9d7a695b02 (diff) | |
parent | 86d85e9966d5d6283aa0044a6d8430d9ceab8058 (diff) | |
download | json-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.c | 5 |
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) |