summaryrefslogtreecommitdiff
path: root/source4/torture/smb2/durable_open.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-10-28 00:11:08 +0200
committerMichael Adam <obnox@samba.org>2011-10-28 02:37:25 +0200
commitac79427aa003542984769091188bd40059759cc9 (patch)
treee7008c37d394a72ea70933b6be75b2d830e2443f /source4/torture/smb2/durable_open.c
parentdaf7193c1d04f9a40c26a609e9bacad7f61d63b5 (diff)
downloadsamba-ac79427aa003542984769091188bd40059759cc9.tar.gz
samba-ac79427aa003542984769091188bd40059759cc9.tar.bz2
samba-ac79427aa003542984769091188bd40059759cc9.zip
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 <obnox@samba.org> Autobuild-Date: Fri Oct 28 02:37:25 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/torture/smb2/durable_open.c')
-rw-r--r--source4/torture/smb2/durable_open.c13
1 files changed, 13 insertions, 0 deletions
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;
}