[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-2904-gb1e8e5d

Volker Lendecke vlendec at samba.org
Wed Jun 18 14:30:27 GMT 2008


The branch, v3-3-test has been updated
       via  b1e8e5d173cdaa3fb9c1fb1d9aacf8e665bc5d61 (commit)
      from  c65b456c6a145d15b7fd27a2a3440a0709fc3277 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit b1e8e5d173cdaa3fb9c1fb1d9aacf8e665bc5d61
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jun 18 16:30:37 2008 +0200

    Revert "Fix a memleak in svcctl_init_keys()"
    
    This reverts commit b1afb31f3cadd4749bf6e3eb5d8935588bf8ebfc.
    
    This one is very strange: I need to investigate why valgrind showed it as
    leaking, and why in my initial tests this did not fail.
    (cherry picked from commit 24730f5981efb920811e7929a9483bd72bb0984c)

-----------------------------------------------------------------------

Summary of changes:
 source/services/services_db.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/services/services_db.c b/source/services/services_db.c
index ae9fe1a..620b036 100644
--- a/source/services/services_db.c
+++ b/source/services/services_db.c
@@ -447,22 +447,15 @@ void svcctl_init_keys( void )
 	REGSUBKEY_CTR *subkeys;
 	REGISTRY_KEY *key = NULL;
 	WERROR wresult;
-	struct nt_user_token *token = get_root_nt_token();
-
-	if (token == NULL) {
-		DEBUG(0, ("svcctl_init_keys: get_root_nt_token failed\n"));
-		return;
-	}
 
 	/* bad mojo here if the lookup failed.  Should not happen */
 
 	wresult = regkey_open_internal( NULL, &key, KEY_SERVICES,
-					token, REG_KEY_ALL );
+					get_root_nt_token(), REG_KEY_ALL );
 
 	if ( !W_ERROR_IS_OK(wresult) ) {
 		DEBUG(0,("svcctl_init_keys: key lookup failed! (%s)\n",
 			dos_errstr(wresult)));
-		TALLOC_FREE(token);
 		return;
 	}
 
@@ -471,7 +464,6 @@ void svcctl_init_keys( void )
 	if ( !(subkeys = TALLOC_ZERO_P( key, REGSUBKEY_CTR )) ) {
 		DEBUG(0,("svcctl_init_keys: talloc() failed!\n"));
 		TALLOC_FREE( key );
-		TALLOC_FREE(token);
 		return;
 	}
 
@@ -494,7 +486,6 @@ void svcctl_init_keys( void )
 	}
 
 	TALLOC_FREE( key );
-	TALLOC_FREE(token);
 
 	/* initialize the control hooks */
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list