s3:services_db: use regsubkey_ctr_init() instead of using talloc directly
authorMichael Adam <obnox@samba.org>
Tue, 24 Feb 2009 22:23:04 +0000 (23:23 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 19 Mar 2009 17:03:58 +0000 (18:03 +0100)
Michael

Signed-off-by: Michael Adam <obnox@samba.org>
source/services/services_db.c

index 43b714d37ededcddbee7484a5b07c2d20c9d811c..faeaf3bfe4e545a875c4f14a7df41f4090821d3d 100644 (file)
@@ -366,7 +366,8 @@ static void add_new_svc_name( REGISTRY_KEY *key_parent, struct regsubkey_ctr *su
 
        /* add the 'Security' key */
 
-       if ( !(svc_subkeys = TALLOC_ZERO_P( key_service, struct regsubkey_ctr )) ) {
+       wresult = regsubkey_ctr_init(key_service, &svc_subkeys);
+       if (!W_ERROR_IS_OK(wresult)) {
                DEBUG(0,("add_new_svc_name: talloc() failed!\n"));
                TALLOC_FREE( key_service );
                return;
@@ -461,7 +462,8 @@ void svcctl_init_keys( void )
 
        /* lookup the available subkeys */
 
-       if ( !(subkeys = TALLOC_ZERO_P( key, struct regsubkey_ctr )) ) {
+       wresult = regsubkey_ctr_init(key, &subkeys);
+       if (!W_ERROR_IS_OK(wresult)) {
                DEBUG(0,("svcctl_init_keys: talloc() failed!\n"));
                TALLOC_FREE( key );
                return;