From: Jeremy Allison Date: Tue, 1 Jun 2021 20:27:47 +0000 (-0700) Subject: s3: lib: Fix talloc heirarcy error in parent_smb_fname(). X-Git-Tag: tevent-0.11.0~686 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c500d99e2f5aaec102bf952b7941a2596b3e35a1;p=thirdparty%2Fsamba.git 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 --- 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;