diff --git a/source/locking/posix.c b/source/locking/posix.c index 6173c80b2fd..0e5edfa0eb8 100644 --- a/source/locking/posix.c +++ b/source/locking/posix.c @@ -238,7 +238,7 @@ int fd_close_posix(struct connection_struct *conn, files_struct *fsp) if (!add_fd_to_close_entry(fsp)) { SAFE_FREE(entries); - return False; + return -1; } SAFE_FREE(entries); @@ -281,9 +281,9 @@ int fd_close_posix(struct connection_struct *conn, files_struct *fsp) ret = SMB_VFS_CLOSE(fsp,fsp->fd); if (saved_errno != 0) { - errno = saved_errno; + errno = saved_errno; ret = -1; - } + } fsp->fd = -1;