]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Use cp_smb_filename_nostream() in adouble_path()
authorVolker Lendecke <vl@samba.org>
Tue, 22 Feb 2022 14:42:41 +0000 (15:42 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 1 Mar 2022 20:09:28 +0000 (20:09 +0000)
No need to TALLOC_FREE(smb_fname->stream_name) later

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/adouble.c

index dda7a5ec05f2b26b0c9ab33bf8913e6f126a9c0e..ef48d1aa73aaff164c5675ec161acaa5bebd9357 100644 (file)
@@ -2757,17 +2757,14 @@ int adouble_path(TALLOC_CTX *ctx,
 {
        char *parent;
        const char *base;
-       struct smb_filename *smb_fname = cp_smb_filename(ctx,
-                                               smb_fname_in);
+       struct smb_filename *smb_fname = NULL;
 
+       smb_fname = cp_smb_filename_nostream(ctx, smb_fname_in);
        if (smb_fname == NULL) {
                return -1;
        }
 
-       /* We need streamname to be NULL */
-       TALLOC_FREE(smb_fname->stream_name);
-
-       /* And we're replacing base_name. */
+       /* We're replacing base_name. */
        TALLOC_FREE(smb_fname->base_name);
 
        SET_STAT_INVALID(smb_fname->st);