From: Volker Lendecke Date: Tue, 22 Feb 2022 14:42:41 +0000 (+0100) Subject: lib: Use cp_smb_filename_nostream() in adouble_path() X-Git-Tag: tevent-0.12.0~619 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d255044e2ab971ea39f0eed25e5c53a0c56d3a3a;p=thirdparty%2Fsamba.git lib: Use cp_smb_filename_nostream() in adouble_path() No need to TALLOC_FREE(smb_fname->stream_name) later Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c index dda7a5ec05f..ef48d1aa73a 100644 --- a/source3/lib/adouble.c +++ b/source3/lib/adouble.c @@ -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);