summaryrefslogtreecommitdiff
path: root/source3/smbd/close.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/close.c')
-rw-r--r--source3/smbd/close.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index 42b16bc7ac..e9606cdfbe 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -117,7 +117,8 @@ void close_file(files_struct *fsp, BOOL normal_close)
del_share_mode(token, fsp);
}
- fd_attempt_close(fsp->fd_ptr);
+ if(fd_attempt_close(fsp->fd_ptr) == 0)
+ fsp->fd_ptr = NULL;
if (lp_share_modes(SNUM(conn)))
unlock_share_entry(conn, dev, inode, token);