]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: let open_pathref_base_fsp() make use of smb_fname_fsp_unlink()
authorStefan Metzmacher <metze@samba.org>
Wed, 16 Dec 2020 14:12:46 +0000 (15:12 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 14 Jan 2021 11:30:38 +0000 (11:30 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/files.c

index 84717d91767f759a2ea2d0ed80bd816845379c05..122afa4f3d696a39e2d9b0834eff1524e36af466 100644 (file)
@@ -396,9 +396,7 @@ static NTSTATUS open_pathref_base_fsp(const struct files_struct *dirfsp,
        }
 
        fsp->base_fsp = smb_fname_base->fsp;
-       smb_fname_base->fsp = NULL;
-       talloc_set_destructor(smb_fname_base->fsp_link, NULL);
-       talloc_set_destructor(smb_fname_base, NULL);
+       smb_fname_fsp_unlink(smb_fname_base);
        TALLOC_FREE(smb_fname_base);
 
        return NT_STATUS_OK;