summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc_registry.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-03-05 12:24:35 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-03-05 12:24:35 +1100
commit41760c18bdab20d526d32568531bdf7c88272879 (patch)
treeb2f421919501a3061afe40f0cb0980f86f448ea8 /source3/utils/net_rpc_registry.c
parent8249383efb2037bb234dd040ebe151329cc4feb9 (diff)
parentc8ea9d1f13096cd7f51e5972915a61ca65b56ac3 (diff)
downloadsamba-41760c18bdab20d526d32568531bdf7c88272879.tar.gz
samba-41760c18bdab20d526d32568531bdf7c88272879.tar.bz2
samba-41760c18bdab20d526d32568531bdf7c88272879.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba into wspp-schema
Diffstat (limited to 'source3/utils/net_rpc_registry.c')
-rw-r--r--source3/utils/net_rpc_registry.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c
index 005e3ca556..00c827928e 100644
--- a/source3/utils/net_rpc_registry.c
+++ b/source3/utils/net_rpc_registry.c
@@ -971,12 +971,15 @@ static bool write_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
{
REGF_NK_REC *key, *subkey;
REGVAL_CTR *values = NULL;
- REGSUBKEY_CTR *subkeys = NULL;
+ struct regsubkey_ctr *subkeys = NULL;
int i;
char *path = NULL;
+ WERROR werr;
- if ( !( subkeys = TALLOC_ZERO_P( infile->mem_ctx, REGSUBKEY_CTR )) ) {
- DEBUG(0,("write_registry_tree: talloc() failed!\n"));
+ werr = regsubkey_ctr_init(infile->mem_ctx, &subkeys);
+ if (!W_ERROR_IS_OK(werr)) {
+ DEBUG(0, ("write_registry_tree: regsubkey_ctr_init failed: "
+ "%s\n", win_errstr(werr)));
return false;
}
@@ -993,7 +996,7 @@ static bool write_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
(const char *)nk->values[i].data, (nk->values[i].data_size & ~VK_DATA_IN_OFFSET) );
}
- /* copy subkeys into the REGSUBKEY_CTR */
+ /* copy subkeys into the struct regsubkey_ctr */
while ( (subkey = regfio_fetch_subkey( infile, nk )) ) {
regsubkey_ctr_addkey( subkeys, subkey->keyname );