mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
lib: Slightly tune cp_smb_filename_nostream()
Don't talloc_strdup() the stream_name, just to free it again. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
68078e560a
commit
05c41a02dd
@ -80,12 +80,12 @@ struct smb_filename *synthetic_smb_fname(TALLOC_CTX *mem_ctx,
|
||||
struct smb_filename *cp_smb_filename_nostream(TALLOC_CTX *mem_ctx,
|
||||
const struct smb_filename *smb_fname_in)
|
||||
{
|
||||
struct smb_filename *smb_fname = cp_smb_filename(mem_ctx,
|
||||
smb_fname_in);
|
||||
if (smb_fname == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
TALLOC_FREE(smb_fname->stream_name);
|
||||
struct smb_filename smb_fname_loc = *smb_fname_in;
|
||||
struct smb_filename *smb_fname = NULL;
|
||||
|
||||
smb_fname_loc.stream_name = NULL;
|
||||
|
||||
smb_fname = cp_smb_filename(mem_ctx, &smb_fname_loc);
|
||||
return smb_fname;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user