From: Ralph Boehme Date: Tue, 13 Oct 2020 14:47:51 +0000 (+0200) Subject: smbd: remove unused cwdfsp from non_widelink_open() X-Git-Tag: samba-4.14.0rc1~379 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d680e9aab169cf83b7966df814f33d6a5532c2ab;p=thirdparty%2Fsamba.git smbd: remove unused cwdfsp from non_widelink_open() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 06e5da9037f..04e7d5d94b7 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -656,7 +656,6 @@ static int non_widelink_open(const struct files_struct *dirfsp, int saved_errno = 0; struct smb_filename *oldwd_fname = NULL; struct smb_filename *parent_dir_fname = NULL; - struct files_struct *cwdfsp = NULL; bool have_opath = false; bool ok; @@ -709,14 +708,6 @@ static int non_widelink_open(const struct files_struct *dirfsp, goto out; } - status = vfs_at_fspcwd(talloc_tos(), - conn, - &cwdfsp); - if (!NT_STATUS_IS_OK(status)) { - saved_errno = map_errno_from_nt_status(status); - goto out; - } - flags |= O_NOFOLLOW; fsp->fsp_name = smb_fname_rel; @@ -821,7 +812,6 @@ static int non_widelink_open(const struct files_struct *dirfsp, out: TALLOC_FREE(parent_dir_fname); - TALLOC_FREE(cwdfsp); if (oldwd_fname != NULL) { int ret = vfs_ChDir(conn, oldwd_fname);