1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

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>
This commit is contained in:
brendan powers 2009-12-16 19:01:32 -05:00 committed by Andrew Tridgell
parent fae70e1f54
commit 0708b2a0c9

View File

@ -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) {