]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In dfs_filename_convert(), don't ask for hostname, sharename and then just...
authorJeremy Allison <jra@samba.org>
Wed, 17 Aug 2022 21:21:59 +0000 (14:21 -0700)
committerJeremy Allison <jra@samba.org>
Sun, 28 Aug 2022 19:59:28 +0000 (19:59 +0000)
Wastes a talloc/free.

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

index ea365eb07a556cb2b03cdcf6b6e4255618cedc2f..2c2ad8ea82573571914aaab28b95624173c715a0 100644 (file)
@@ -1128,8 +1128,6 @@ NTSTATUS dfs_filename_convert(TALLOC_CTX *ctx,
                              const char *dfs_path_in,
                              char **pp_path_out)
 {
-       char *hostname = NULL;
-       char *servicename = NULL;
        char *reqpath = NULL;
        NTSTATUS status;
 
@@ -1137,20 +1135,13 @@ NTSTATUS dfs_filename_convert(TALLOC_CTX *ctx,
                                conn,
                                dfs_path_in,
                                !conn->sconn->using_smb2,
-                               &hostname,
-                               &servicename,
+                               NULL, /* hostname */
+                               NULL, /* servicename */
                                &reqpath);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }
 
-       /*
-        * Caller doesn't care about hostname
-        * or servicename.
-        */
-       TALLOC_FREE(hostname);
-       TALLOC_FREE(servicename);
-
        /*
         * If parse_dfs_path fell back to a local path
         * after skipping hostname or servicename, ensure