summaryrefslogtreecommitdiff
path: root/source4/torture/smb2
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/smb2')
-rw-r--r--source4/torture/smb2/durable_open.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/torture/smb2/durable_open.c b/source4/torture/smb2/durable_open.c
index c783fc310c..ec63c5c3ce 100644
--- a/source4/torture/smb2/durable_open.c
+++ b/source4/torture/smb2/durable_open.c
@@ -541,13 +541,15 @@ static bool test_durable_open_reopen2a(struct torture_context *tctx,
h = &_h;
done:
- if (h != NULL) {
- smb2_util_close(tree, *h);
- }
+ if (tree != NULL) {
+ if (h != NULL) {
+ smb2_util_close(tree, *h);
+ }
- smb2_util_unlink(tree, fname);
+ smb2_util_unlink(tree, fname);
- talloc_free(tree);
+ talloc_free(tree);
+ }
talloc_free(mem_ctx);