summaryrefslogtreecommitdiff
path: root/source3/utils/profiles.c
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2014-11-04 23:51:23 +0100
committerChristian Ambach <ambi@samba.org>2014-12-03 00:43:19 +0100
commit3b90bfb1089e6a4b7e05e7ed62bb642521f57917 (patch)
tree9e37f1f555885f3f7b20235492f15eebab28a498 /source3/utils/profiles.c
parent4b41489901b7f1a78ffd479128c3e0d309e53b53 (diff)
downloadsamba-3b90bfb1089e6a4b7e05e7ed62bb642521f57917.tar.gz
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 <ambi@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Wed Dec 3 00:43:19 CET 2014 on sn-devel-104
Diffstat (limited to 'source3/utils/profiles.c')
-rw-r--r--source3/utils/profiles.c6
1 files 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;
}