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:
parent
fae70e1f54
commit
0708b2a0c9
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user