summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArturo Borrero <arturo.borrero.glez@gmail.com>2013-10-31 13:36:23 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2013-11-03 22:26:54 +0100
commit638a01c10583727fe2f77e63213a09b38e1e2358 (patch)
tree6d54d9408438dd1ea597cd273d778e49bd225f0a /tests
parent84edd14712181b0a4c40da6a9a94a897fcb74e20 (diff)
test: fix memleak in XML testing
Ensure the tree is freed when done. Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/nft-parsing-test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/nft-parsing-test.c b/tests/nft-parsing-test.c
index 70028a0..5eaaa1e 100644
--- a/tests/nft-parsing-test.c
+++ b/tests/nft-parsing-test.c
@@ -335,9 +335,11 @@ static int test_xml(const char *filename)
}
}
+ mxmlDelete(tree);
return ret;
failparsing:
+ mxmlDelete(tree);
printf("parsing %s: ", filename);
printf("\033[31mFAILED\e[0m (%s)\n", strerror(errno));
return -1;