From: Ralph Boehme Date: Wed, 26 Feb 2025 15:29:18 +0000 (+0100) Subject: smbd: free smbXsrv_open if SMB_VFS_DURABLE_RECONNECT() failed X-Git-Tag: tevent-0.17.0~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=15c6b767f937867957c15790ff3fda886f1b347c;p=thirdparty%2Fsamba.git smbd: free smbXsrv_open if SMB_VFS_DURABLE_RECONNECT() failed 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 Reviewed-by: Stefan Metzmacher --- diff --git a/selftest/knownfail.d/samba3.smb2.durable-open b/selftest/knownfail.d/samba3.smb2.durable-open deleted file mode 100644 index 5f704cff2ba..00000000000 --- a/selftest/knownfail.d/samba3.smb2.durable-open +++ /dev/null @@ -1 +0,0 @@ -^samba3.smb2.durable-open.reopen5\(nt4_dc\) diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 78da998e169..d82018519c5 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -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); }