From: Jeremy Allison Date: Thu, 26 Mar 2020 23:24:08 +0000 (-0700) Subject: s3: smbd: Remove all references to original_lcomp from name copying code. X-Git-Tag: ldb-2.2.0~1145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0d3190b4b199dff4f2089533db6fb32b939a826;p=thirdparty%2Fsamba.git s3: smbd: Remove all references to original_lcomp from name copying code. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/lib/filename_util.c b/source3/lib/filename_util.c index 66c07001eba..1f2e4d31072 100644 --- a/source3/lib/filename_util.c +++ b/source3/lib/filename_util.c @@ -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;