From b384d0d49d1c3748c03e86f84ad7f1e4a6bc55b2 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 24 Feb 2009 23:23:04 +0100 Subject: s3:services_db: use regsubkey_ctr_init() instead of using talloc directly Michael --- source3/services/services_db.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source3/services/services_db.c b/source3/services/services_db.c index 2000ca9272..7a4b90c7cf 100644 --- a/source3/services/services_db.c +++ b/source3/services/services_db.c @@ -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; -- cgit