summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-02-13 14:11:57 +0100
committerStefan Metzmacher <metze@samba.org>2013-02-18 15:56:20 +0100
commit295444266d33863e3a8b7c8ffa5d193123db6132 (patch)
tree17beea0fbf9bfe0dd5cb74b742daa97196804d57
parent2f8a033bf2563d547e42be5603074223078595f9 (diff)
downloadsamba-295444266d33863e3a8b7c8ffa5d193123db6132.tar.gz
samba-295444266d33863e3a8b7c8ffa5d193123db6132.tar.bz2
samba-295444266d33863e3a8b7c8ffa5d193123db6132.zip
s4:torture: fix segfault in test_durable_open_open2_oplock()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r--source4/torture/smb2/durable_open.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/torture/smb2/durable_open.c b/source4/torture/smb2/durable_open.c
index eea8747037..e3d9185bdc 100644
--- a/source4/torture/smb2/durable_open.c
+++ b/source4/torture/smb2/durable_open.c
@@ -1552,8 +1552,10 @@ static bool test_durable_open_open2_oplock(struct torture_context *tctx,
done:
smb2_util_close(tree2, h2);
smb2_util_unlink(tree2, fname);
- smb2_util_close(tree1, h1);
- smb2_util_unlink(tree1, fname);
+ if (tree1 != NULL) {
+ smb2_util_close(tree1, h1);
+ smb2_util_unlink(tree1, fname);
+ }
talloc_free(tree1);
talloc_free(tree2);