From: Stefan Metzmacher Date: Wed, 16 Dec 2020 14:12:46 +0000 (+0100) Subject: s3:smbd: let open_pathref_base_fsp() make use of smb_fname_fsp_unlink() X-Git-Tag: samba-4.14.0rc1~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30134630988ca76545a8aee8516d44a0dc64bc8d;p=thirdparty%2Fsamba.git s3:smbd: let open_pathref_base_fsp() make use of smb_fname_fsp_unlink() Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 84717d91767..122afa4f3d6 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -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;