1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s4:torture:smb2: fix segfault on error condition in the durable-open.reopen4 test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Michael Adam 2013-02-13 15:03:00 +01:00 committed by Stefan Metzmacher
parent 10fcbc6869
commit 98b0e909b7

View File

@ -707,14 +707,16 @@ static bool test_durable_open_reopen4(struct torture_context *tctx,
CHECK_VAL(io2.out.oplock_level, smb2_util_oplock_level("b"));
done:
if (h != NULL) {
smb2_util_close(tree2, *h);
if (tree != NULL) {
if (h != NULL) {
smb2_util_close(tree2, *h);
}
smb2_util_unlink(tree2, fname);
talloc_free(tree);
}
smb2_util_unlink(tree2, fname);
talloc_free(tree);
talloc_free(mem_ctx);
return ret;