1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00

s3: smbd: simplify dptr_CloseDir()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2019-08-04 09:15:47 +02:00
parent 6d0924d8ea
commit 7d72cf02e7

View File

@ -370,15 +370,17 @@ done:
void dptr_CloseDir(files_struct *fsp)
{
if (fsp->dptr) {
/*
* The destructor for the struct smb_Dir
* (fsp->dptr->dir_hnd) now handles
* all resource deallocation.
*/
dptr_close_internal(fsp->dptr);
fsp->dptr = NULL;
if (fsp->dptr == NULL) {
return;
}
/*
* The destructor for the struct smb_Dir (fsp->dptr->dir_hnd)
* now handles all resource deallocation.
*/
dptr_close_internal(fsp->dptr);
fsp->dptr = NULL;
}
void dptr_SeekDir(struct dptr_struct *dptr, long offset)