summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2007-10-15 07:24:44 +0400
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-15 17:41:09 -0500
commitd76717fe150846cb90af58ac1c6e007aeced3df1 (patch)
treecd9814f3a05e6417120cfdf05c4185f5c97bbc0b /source3/utils
parent06ae5243f302c79fa2fe9ebbf1fb212e2f830c18 (diff)
downloadsamba-d76717fe150846cb90af58ac1c6e007aeced3df1.tar.gz
samba-d76717fe150846cb90af58ac1c6e007aeced3df1.tar.bz2
samba-d76717fe150846cb90af58ac1c6e007aeced3df1.zip
Correctly free memory in regfio paths
(This used to be commit 97f9a90b823887e808cca96eca7a041f121e6111)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/profiles.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c
index 7c7b91adb1..921af56657 100644
--- a/source3/utils/profiles.c
+++ b/source3/utils/profiles.c
@@ -138,6 +138,7 @@ static BOOL copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
}
if ( !(values = TALLOC_ZERO_P( subkeys, REGVAL_CTR )) ) {
+ TALLOC_FREE( subkeys );
DEBUG(0,("copy_registry_tree: talloc() failure!\n"));
return False;
}
@@ -163,8 +164,10 @@ static BOOL copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
nk->subkey_index = 0;
while ( (subkey = regfio_fetch_subkey( infile, nk )) ) {
- if ( !copy_registry_tree( infile, subkey, key, outfile, path ) )
+ if ( !copy_registry_tree( infile, subkey, key, outfile, path ) ) {
+ TALLOC_FREE( subkeys );
return False;
+ }
}
/* values is a talloc()'d child of subkeys here so just throw it all away */