summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/nft-parsing-test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/nft-parsing-test.c b/tests/nft-parsing-test.c
index 57dc6a5..9e457e8 100644
--- a/tests/nft-parsing-test.c
+++ b/tests/nft-parsing-test.c
@@ -191,13 +191,15 @@ static int test_json(const char *filename)
}
}
- free(root);
+ free(json);
+ json_decref(root);
return ret;
failparsing:
printf("parsing %s: ", filename);
printf("\033[31mFAILED\e[0m (%s)\n", strerror(errno));
- free(root);
+ free(json);
+ json_decref(root);
return -1;
#else
errno = EOPNOTSUPP;