From 3b90bfb1089e6a4b7e05e7ed62bb642521f57917 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Tue, 4 Nov 2014 23:51:23 +0100 Subject: 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 --- 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 0f274ad604a..22c8f723de7 100644 --- a/source3/utils/profiles.c +++ b/source3/utils/profiles.c @@ -189,12 +189,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; } -- cgit v1.2.1