mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
r24571: Only look at errno if the close call actually failed
Patch from Ofir Azoulay <Ofir.Azoulay@expand.com> -- thanks (This used to be commit 888e657d758173c0eb4b68059d6fb5ae45b2b2ed)
This commit is contained in:
parent
8fb2e83733
commit
8bab4bdc5d
@ -640,7 +640,10 @@ NTSTATUS fd_close_posix(struct connection_struct *conn, files_struct *fsp)
|
||||
*/
|
||||
ret = SMB_VFS_CLOSE(fsp,fsp->fh->fd);
|
||||
fsp->fh->fd = -1;
|
||||
return map_nt_error_from_unix(errno);
|
||||
if (ret == -1) {
|
||||
return map_nt_error_from_unix(errno);
|
||||
}
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
if (get_windows_lock_ref_count(fsp)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user