aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2020-05-09 13:23:52 -0700
committerLeandro Pereira <leandro@hardinfo.org>2020-05-09 13:23:52 -0700
commitba8e50248893ab5574acb9de9e1bcc19ba127ce5 (patch)
tree21889cf0590fbc62124c638e887b767a6d811319
parent7bbee725f18cd12de537979d52ee3eb7eb391495 (diff)
Unrefing the JSON parser unrefs its children nodes
-rw-r--r--modules/benchmark.c4
1 files changed, 1 insertions, 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) {