From bf65ff5ea2b84f3f5406d840f759da87e146cc3a Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 24 May 2010 15:08:58 +0200 Subject: [PATCH] s3:profiles: use regval_ctr_init() instead of direct allocation --- source3/utils/profiles.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c index 5e2cd9a392c..f793704be5c 100644 --- a/source3/utils/profiles.c +++ b/source3/utils/profiles.c @@ -140,7 +140,8 @@ static bool copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk, return False; } - if ( !(values = TALLOC_ZERO_P( subkeys, struct regval_ctr )) ) { + werr = regval_ctr_init(subkeys, &values); + if (!W_ERROR_IS_OK(werr)) { TALLOC_FREE( subkeys ); DEBUG(0,("copy_registry_tree: talloc() failure!\n")); return False; -- 2.11.4.GIT