]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: free smbXsrv_open if SMB_VFS_DURABLE_RECONNECT() failed
authorRalph Boehme <slow@samba.org>
Wed, 26 Feb 2025 15:29:18 +0000 (16:29 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 6 Jun 2025 16:16:34 +0000 (16:16 +0000)
Otherwise we leave "op" around which ultimately leads to smbXsrv_open_close()
being called from its destructor smbXsrv_open_destructor() that is triggerd by
its tree disconnect (or logoff, or ...) and this would clobber the open record.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15649
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15651

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
selftest/knownfail.d/samba3.smb2.durable-open [deleted file]
source3/smbd/smb2_create.c

diff --git a/selftest/knownfail.d/samba3.smb2.durable-open b/selftest/knownfail.d/samba3.smb2.durable-open
deleted file mode 100644 (file)
index 5f704cf..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba3.smb2.durable-open.reopen5\(nt4_dc\)
index 78da998e1697f70427bdf37ef30bb8af1f5801ee..d82018519c50a47edef95e5eecce779e68b1aa2f 100644 (file)
@@ -1135,6 +1135,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
                                   nt_errstr(status),
                                   nt_errstr(return_status));
 
+                       TALLOC_FREE(state->op);
                        tevent_req_nterror(req, return_status);
                        return tevent_req_post(req, state->ev);
                }