mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s4:torture:smb2: fix segfault on error condition in the durable-open.delete_on_close2 test
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
1d3bd45d61
commit
2f8a033bf2
@ -897,14 +897,16 @@ static bool test_durable_open_delete_on_close2(struct torture_context *tctx,
|
||||
CHECK_VAL(io.out.oplock_level, smb2_util_oplock_level("b"));
|
||||
|
||||
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);
|
||||
|
||||
talloc_free(tree);
|
||||
}
|
||||
|
||||
smb2_util_unlink(tree, fname);
|
||||
|
||||
talloc_free(tree);
|
||||
|
||||
talloc_free(mem_ctx);
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user