]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: avoid a smb_fname copy in call_trans2qfilepathinfo()
authorRalph Boehme <slow@samba.org>
Tue, 20 Oct 2020 15:07:35 +0000 (17:07 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 19 Nov 2020 20:00:38 +0000 (20:00 +0000)
No point in making a copy here.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/trans2.c

index 5266e8f316b3ee5fd61cb2b958569f16cc1243ba..14f21b07f420469dde91d26f3e486e13261c3b72 100644 (file)
@@ -6037,11 +6037,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
                        return;
                }
 
-               smb_fname = cp_smb_filename(talloc_tos(), fsp->fsp_name);
-               if (smb_fname == NULL) {
-                       reply_nterror(req, NT_STATUS_NO_MEMORY);
-                       return;
-               }
+               smb_fname = fsp->fsp_name;
 
                if(fsp->fake_file_handle) {
                        /*