git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fae70e1
)
s4-ntvfs: check if pvfs is NULL in pvfs_logoff
author
brendan powers
<brendan0powers@gmail.com>
Thu, 17 Dec 2009 00:01:32 +0000
(19:01 -0500)
committer
Andrew Tridgell
<tridge@samba.org>
Thu, 17 Dec 2009 00:48:39 +0000
(11:48 +1100)
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>
source4/ntvfs/posix/pvfs_open.c
patch
|
blob
|
history
diff --git
a/source4/ntvfs/posix/pvfs_open.c
b/source4/ntvfs/posix/pvfs_open.c
index 621db3cf1da9a56bdbb7c23762c50a00facf5c35..aa66ad782d12906853e331efcb2308dede3dccf5 100644
(file)
--- 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) {