s3: smbd: Remove all references to original_lcomp from name copying code.
authorJeremy Allison <jra@samba.org>
Thu, 26 Mar 2020 23:24:08 +0000 (16:24 -0700)
committerRalph Boehme <slow@samba.org>
Mon, 30 Mar 2020 14:45:31 +0000 (14:45 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/lib/filename_util.c

index 66c07001eba273b0424ad03f31cc8312040b0ff6..1f2e4d31072fc8541bcbab411a8a3dabae3cb0af 100644 (file)
@@ -183,7 +183,6 @@ struct smb_filename *cp_smb_filename(TALLOC_CTX *mem_ctx,
        struct smb_filename *out;
        size_t base_len = 0;
        size_t stream_len = 0;
-       size_t lcomp_len = 0;
        int num = 0;
 
        /* stream_name must always be NULL if there is no stream. */
@@ -199,13 +198,9 @@ struct smb_filename *cp_smb_filename(TALLOC_CTX *mem_ctx,
                stream_len = strlen(in->stream_name) + 1;
                num += 1;
        }
-       if (in->original_lcomp != NULL) {
-               lcomp_len = strlen(in->original_lcomp) + 1;
-               num += 1;
-       }
 
        out = talloc_pooled_object(mem_ctx, struct smb_filename,
-                               num, stream_len + base_len + lcomp_len);
+                               num, stream_len + base_len);
        if (out == NULL) {
                return NULL;
        }
@@ -228,12 +223,6 @@ struct smb_filename *cp_smb_filename(TALLOC_CTX *mem_ctx,
                talloc_set_name_const(out->stream_name,
                                      out->stream_name);
        }
-       if (in->original_lcomp != NULL) {
-               out->original_lcomp = talloc_memdup(
-                               out, in->original_lcomp, lcomp_len);
-               talloc_set_name_const(out->original_lcomp,
-                                     out->original_lcomp);
-       }
        out->flags = in->flags;
        out->st = in->st;
        return out;