From: MikeLiu Date: Fri, 13 Oct 2023 03:55:52 +0000 (+0800) Subject: shadow_copy2: Add missing TALLOC_FREE X-Git-Tag: talloc-2.4.2~1238 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f392fdfd47f47e371fe75f5cd4647126922fda19;p=thirdparty%2Fsamba.git shadow_copy2: Add missing TALLOC_FREE Signed-off-by: MikeLiu Reviewed-by: Joseph Sutton Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Tue Oct 17 20:22:18 UTC 2023 on atb-devel-224 --- diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 8471d81c153..ac87ddac46f 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -1580,9 +1580,12 @@ static int shadow_copy2_openat(vfs_handle_struct *handle, &stripped, &is_converted); if (!ok) { + TALLOC_FREE(smb_fname); return -1; } if (timestamp == 0) { + TALLOC_FREE(stripped); + TALLOC_FREE(smb_fname); if (is_converted) { /* * Just pave over the user requested mode and use @@ -2386,6 +2389,7 @@ static int shadow_copy2_mkdirat(vfs_handle_struct *handle, full_fname, ×tamp, NULL)) { + TALLOC_FREE(full_fname); return -1; } TALLOC_FREE(full_fname);