mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
smbd: don't leak the fsp if close_file_smb() fails
This can happen if DELETE-ON-CLOSE is set, but the deletion fails for some reason. The bug was introduced by1808e5c133
. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15417 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Jul 10 21:32:32 UTC 2023 on atb-devel-224 (cherry picked from commit4da50463e1
) Autobuild-User(v4-18-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-18-test): Wed Jul 19 16:23:17 UTC 2023 on atb-devel-224
This commit is contained in:
parent
5ac859e96e
commit
96793d4290
@ -225,6 +225,8 @@ static NTSTATUS smbd_smb2_close(struct smbd_smb2_request *req,
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(5,("smbd_smb2_close: close_file[%s]: %s\n",
|
||||
smb_fname_str_dbg(smb_fname), nt_errstr(status)));
|
||||
file_free(smbreq, fsp);
|
||||
*_fsp = fsp = NULL;
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user