summaryrefslogtreecommitdiffstats
path: root/source/smbd/oplock.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-11-18 19:06:51 +0000
committerJeremy Allison <jra@samba.org>1998-11-18 19:06:51 +0000
commitc154b1601f5891d664fc538ec8874fa8ef2061e6 (patch)
treec429c9a3d926f4fea98dc7c81a12128977b09c35 /source/smbd/oplock.c
parent05f2d78c8ee1dc0516d9e1076e0954ee2c2cd4b2 (diff)
downloadsamba-c154b1601f5891d664fc538ec8874fa8ef2061e6.tar.gz
samba-c154b1601f5891d664fc538ec8874fa8ef2061e6.tar.xz
samba-c154b1601f5891d664fc538ec8874fa8ef2061e6.zip
Fixed crash bug which was assuming that fd_ptr was always non-null
(which is not the case with open directories). Jeremy.
Diffstat (limited to 'source/smbd/oplock.c')
-rw-r--r--source/smbd/oplock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/smbd/oplock.c b/source/smbd/oplock.c
index 1d38b362ec0..96afb127aa5 100644
--- a/source/smbd/oplock.c
+++ b/source/smbd/oplock.c
@@ -1008,7 +1008,7 @@ BOOL attempt_close_oplocked_file(files_struct *fsp)
DEBUG(5,("attempt_close_oplocked_file: checking file %s.\n", fsp->fsp_name));
- if (fsp->open && fsp->granted_oplock && !fsp->sent_oplock_break) {
+ if (fsp->open && fsp->granted_oplock && !fsp->sent_oplock_break && (fsp->fd_ptr != NULL)) {
/* Try and break the oplock. */
file_fd_struct *fd_ptr = fsp->fd_ptr;