From: Volker Lendecke Date: Tue, 14 Jun 2022 14:52:39 +0000 (+0200) Subject: smbd: Make fsp_attach_smb_fname() talloc_move() the name to the fsp X-Git-Tag: tevent-0.13.0~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd5e10d60130375c527ef794c9f6482bed5070db;p=thirdparty%2Fsamba.git smbd: Make fsp_attach_smb_fname() talloc_move() the name to the fsp For the current callers this does not make a difference, they have already allocated *_smb_fname as a talloc child of fsp, but the next patches will add one where it does. Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 3d8031bf21f..c9660555569 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -1596,7 +1596,7 @@ NTSTATUS file_name_hash(connection_struct *conn, static NTSTATUS fsp_attach_smb_fname(struct files_struct *fsp, struct smb_filename **_smb_fname) { - struct smb_filename *smb_fname_new = *_smb_fname; + struct smb_filename *smb_fname_new = talloc_move(fsp, _smb_fname); const char *name_str = NULL; uint32_t name_hash = 0; NTSTATUS status;