s3:profiles: use regval_ctr_init() instead of direct allocation
authorMichael Adam <obnox@samba.org>
Mon, 24 May 2010 13:08:58 +0000 (15:08 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 25 May 2010 08:35:30 +0000 (10:35 +0200)
source3/utils/profiles.c

index 5e2cd9a392c13b72ed0a5723d2cddd92b81bda05..f793704be5c2b3055aa9041e3fad7fcee34c5524 100644 (file)
@@ -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;