From ac79427aa003542984769091188bd40059759cc9 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 28 Oct 2011 00:11:08 +0200 Subject: s4:torture:smb2: avoid leaking tree connects up to the main function from the durable_open test The tree connects are handed in from the calling wrapper. Those that are freed and reconnected inside the test function can not be freed in the wrapper and stick to the torture_context until this is released in the main function. Autobuild-User: Michael Adam Autobuild-Date: Fri Oct 28 02:37:25 CEST 2011 on sn-devel-104 --- source4/torture/smb2/durable_open.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source4/torture/smb2') diff --git a/source4/torture/smb2/durable_open.c b/source4/torture/smb2/durable_open.c index 7a85443f25..544f404047 100644 --- a/source4/torture/smb2/durable_open.c +++ b/source4/torture/smb2/durable_open.c @@ -164,6 +164,9 @@ bool test_durable_open_file_position(struct torture_context *tctx, smb2_util_unlink(tree2, fname); done: + talloc_free(tree1); + talloc_free(tree2); + return ret; } @@ -249,6 +252,9 @@ bool test_durable_open_oplock(struct torture_context *tctx, smb2_util_close(tree2, h2); smb2_util_unlink(tree2, fname); + talloc_free(tree1); + talloc_free(tree2); + return ret; } @@ -362,6 +368,9 @@ bool test_durable_open_lease(struct torture_context *tctx, smb2_util_close(tree2, h2); smb2_util_unlink(tree2, fname); + talloc_free(tree1); + talloc_free(tree2); + return ret; } @@ -469,6 +478,7 @@ bool test_durable_open_lock(struct torture_context *tctx, done: smb2_util_close(tree, h); smb2_util_unlink(tree, fname); + talloc_free(tree); return ret; } @@ -580,6 +590,9 @@ bool test_durable_open_open(struct torture_context *tctx, smb2_util_close(tree1, h1); smb2_util_unlink(tree1, fname); + talloc_free(tree1); + talloc_free(tree2); + return ret; } -- cgit