From e026d217bf0d7641ec4f53ede8c6f8eda144a489 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 25 Feb 2009 14:49:30 +0100 Subject: s3:net rpc registry: use regsubkey_ctr_init() instead of using talloc directly. Michael --- source3/utils/net_rpc_registry.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source3/utils') 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; } -- cgit