From 0367f4caff7369ed799d06d98398805b8e48e23a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 1 Jun 2021 13:27:47 -0700 Subject: [PATCH] s3: lib: Fix talloc heirarcy error in parent_smb_fname(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14722 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme (cherry picked from commit c500d99e2f5aaec102bf952b7941a2596b3e35a1) --- source3/lib/filename_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/filename_util.c b/source3/lib/filename_util.c index f535ea1f088..1d4206c3300 100644 --- a/source3/lib/filename_util.c +++ b/source3/lib/filename_util.c @@ -320,7 +320,7 @@ bool parent_smb_fname(TALLOC_CTX *mem_ctx, } TALLOC_FREE(name->base_name); - name->base_name = talloc_strdup(mem_ctx, p); + name->base_name = talloc_strdup(name, p); if (name == NULL) { TALLOC_FREE(frame); return false; -- 2.27.0