summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-02-25 14:49:30 +0100
committerMichael Adam <obnox@samba.org>2009-02-26 13:22:54 +0100
commite026d217bf0d7641ec4f53ede8c6f8eda144a489 (patch)
tree3b60822933fbbc0af7e6afb739334ade08bf4154
parent0b22f8b99c0291f2e45166124358844127fb8edf (diff)
downloadsamba-e026d217bf0d7641ec4f53ede8c6f8eda144a489.tar.gz
samba-e026d217bf0d7641ec4f53ede8c6f8eda144a489.tar.bz2
samba-e026d217bf0d7641ec4f53ede8c6f8eda144a489.zip
s3:net rpc registry: use regsubkey_ctr_init() instead of using talloc directly.
Michael
-rw-r--r--source3/utils/net_rpc_registry.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c
index 4fa5a2fa0a..00c827928e 100644
--- a/source3/utils/net_rpc_registry.c
+++ b/source3/utils/net_rpc_registry.c
@@ -974,9 +974,12 @@ static bool write_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
struct regsubkey_ctr *subkeys = NULL;
int i;
char *path = NULL;
+ WERROR werr;
- if ( !( subkeys = TALLOC_ZERO_P( infile->mem_ctx, struct 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;
}