1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +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) void dptr_CloseDir(files_struct *fsp)
{ {
if (fsp->dptr) { 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;
} }
/*
* 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) void dptr_SeekDir(struct dptr_struct *dptr, long offset)