diff options
author | brendan powers <brendan0powers@gmail.com> | 2009-12-16 19:01:32 -0500 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-12-17 11:48:39 +1100 |
commit | 0708b2a0c91aa3d0c836a3edf21b3cb8fbdcd76c (patch) | |
tree | a8e00b24b948f7100711dc4412df633ba6909fa1 /source4/ntvfs | |
parent | fae70e1f54fb0bcc6c39caad70ed69a626640381 (diff) | |
download | samba-0708b2a0c91aa3d0c836a3edf21b3cb8fbdcd76c.tar.gz samba-0708b2a0c91aa3d0c836a3edf21b3cb8fbdcd76c.tar.bz2 samba-0708b2a0c91aa3d0c836a3edf21b3cb8fbdcd76c.zip |
s4-ntvfs: check if pvfs is NULL in pvfs_logoff
pvfs can be NULL if the directory a share points to does not exist. In
this case, there would be no open files, so it is safe to just return
from the function.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index 621db3cf1d..aa66ad782d 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -1713,6 +1713,11 @@ NTSTATUS pvfs_logoff(struct ntvfs_module_context *ntvfs, struct pvfs_state); struct pvfs_file *f, *next; + /* If pvfs is NULL, we never logged on, and no files are open. */ + if(pvfs == NULL) { + return NT_STATUS_OK; + } + for (f=pvfs->files.list;f;f=next) { next = f->next; if (f->ntvfs->session_info == req->session_info) { |