mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
smbd: update smb_Dir_destructor() to cope with fsp->dptr not being set
Currently the only caller of OpenDir_fsp() is dptr_create() which means fsp->dptr will always be set by dptr_create(). A subsequent commit will add another caller so that fsp->dptr will end up being NULL. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
6dccfd63a8
commit
b6bcc4bddc
@ -1317,8 +1317,10 @@ static int smb_Dir_destructor(struct smb_Dir *dir_hnd)
|
||||
|
||||
SMB_VFS_CLOSEDIR(dir_hnd->conn, dir_hnd->dir);
|
||||
fsp->fh->fd = -1;
|
||||
SMB_ASSERT(fsp->dptr->dir_hnd == dir_hnd);
|
||||
fsp->dptr->dir_hnd = NULL;
|
||||
if (fsp->dptr != NULL) {
|
||||
SMB_ASSERT(fsp->dptr->dir_hnd == dir_hnd);
|
||||
fsp->dptr->dir_hnd = NULL;
|
||||
}
|
||||
dir_hnd->fsp = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user