summaryrefslogtreecommitdiff
path: root/source3/services
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-02-24 23:23:04 +0100
committerMichael Adam <obnox@samba.org>2009-02-26 13:22:53 +0100
commitb384d0d49d1c3748c03e86f84ad7f1e4a6bc55b2 (patch)
treebc7117302040dca6a6db4a3494c0c181d53fb6c3 /source3/services
parent69be6f5c1d11a7beae41d27fa0d429020cbaf363 (diff)
downloadsamba-b384d0d49d1c3748c03e86f84ad7f1e4a6bc55b2.tar.gz
samba-b384d0d49d1c3748c03e86f84ad7f1e4a6bc55b2.tar.bz2
samba-b384d0d49d1c3748c03e86f84ad7f1e4a6bc55b2.zip
s3:services_db: use regsubkey_ctr_init() instead of using talloc directly
Michael
Diffstat (limited to 'source3/services')
-rw-r--r--source3/services/services_db.c6
1 files 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;