json: fix a mem leak

This commit is contained in:
Thomas Hindoe Paaboel Andersen
2015-05-19 23:19:54 +02:00
parent e885c2084a
commit fecb719ec1
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -75,7 +75,7 @@ static void test_one(const char *data, ...) {
typedef void (*Test)(JsonVariant *);
static void test_file(const char *data, Test test) {
JsonVariant *v = NULL;
_cleanup_jsonunref_ JsonVariant *v = NULL;
int r = json_parse(data, &v);
assert_se(r == 0);
@@ -84,8 +84,6 @@ static void test_file(const char *data, Test test) {
if (test)
test(v);
json_variant_unref(v);
}
static void test_1(JsonVariant *v) {