diff mbox

[libnftables,2/6] test: fix memleak in XML testing

Message ID 20131031123623.32572.16985.stgit@nfdev.cica.es
State Accepted
Headers show

Commit Message

Arturo Borrero Oct. 31, 2013, 12:36 p.m. UTC
Ensure the tree is freed when done.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
 tests/nft-parsing-test.c |    2 ++
 1 file changed, 2 insertions(+)


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Pablo Neira Ayuso Nov. 3, 2013, 9:30 p.m. UTC | #1
On Thu, Oct 31, 2013 at 01:36:23PM +0100, Arturo Borrero Gonzalez wrote:
> Ensure the tree is freed when done.

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;