From 759e3fd347dbcaf7ff0a6cd38592542068f8e9f5 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Tue, 4 Nov 2014 23:51:23 +0100 Subject: [PATCH] s3:utils/profiles fix a use after free path is a talloc-child of subkeys, so subkeys should not be freed before calling verbose_output Signed-off-by: Christian Ambach Reviewed-by: Stefan Metzmacher Autobuild-User(master): Christian Ambach Autobuild-Date(master): Wed Dec 3 00:43:19 CET 2014 on sn-devel-104 (cherry picked from commit 3b90bfb1089e6a4b7e05e7ed62bb642521f57917) --- source3/utils/profiles.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c index 30c6ad0a1fb..a88469a9192 100644 --- a/source3/utils/profiles.c +++ b/source3/utils/profiles.c @@ -182,12 +182,12 @@ static bool copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk, } } - /* values is a talloc()'d child of subkeys here so just throw it all away */ - - TALLOC_FREE( subkeys ); verbose_output("[%s]\n", path); + /* values is a talloc()'d child of subkeys here so just throw it all away */ + TALLOC_FREE(subkeys); + return True; } -- 2.11.4.GIT