From ba8e50248893ab5574acb9de9e1bcc19ba127ce5 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Sat, 9 May 2020 13:23:52 -0700 Subject: Unrefing the JSON parser unrefs its children nodes --- modules/benchmark.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/benchmark.c b/modules/benchmark.c index ccdef342..e0d61eab 100644 --- a/modules/benchmark.c +++ b/modules/benchmark.c @@ -451,10 +451,8 @@ static GSList *benchmark_include_results_json(const gchar *path, goto out; root = json_parser_get_root(parser); - if (json_node_get_node_type(root) != JSON_NODE_OBJECT) { - json_node_unref(root); + if (json_node_get_node_type(root) != JSON_NODE_OBJECT) goto out; - } JsonObject *results = json_node_get_object(root); if (results) { -- cgit v1.2.3