From: Ralph Boehme Date: Thu, 2 Jul 2020 06:02:45 +0000 (+0200) Subject: smbd: remove a nested block in non_widelink_open() X-Git-Tag: talloc-2.3.2~1068 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1508d661cbd84bbe7d72b764c529a6214da03bdd;p=thirdparty%2Fsamba.git smbd: remove a nested block in non_widelink_open() No change in behaviour. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 21d611e1818..767d3fefddb 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -628,6 +628,7 @@ static int non_widelink_open(files_struct *fsp, struct connection_struct *conn = fsp->conn; NTSTATUS status; int fd = -1; + struct smb_filename *tmp_fsp_name = fsp->fsp_name; struct smb_filename *smb_fname_rel = NULL; int saved_errno = 0; struct smb_filename *oldwd_fname = NULL; @@ -690,20 +691,16 @@ static int non_widelink_open(files_struct *fsp, flags |= O_NOFOLLOW; - { - struct smb_filename *tmp_name = fsp->fsp_name; - - fsp->fsp_name = smb_fname_rel; + fsp->fsp_name = smb_fname_rel; - fd = SMB_VFS_OPENAT(conn, - cwdfsp, - smb_fname_rel, - fsp, - flags, - mode); + fd = SMB_VFS_OPENAT(conn, + cwdfsp, + smb_fname_rel, + fsp, + flags, + mode); - fsp->fsp_name = tmp_name; - } + fsp->fsp_name = tmp_fsp_name; if (fd == -1) { saved_errno = link_errno_convert(errno);