From: Michael Adam Date: Sat, 22 Mar 2008 00:49:21 +0000 (+0100) Subject: registry: close regdb in error path (and use it) in init_registry(). X-Git-Tag: samba-4.0.0alpha6~801^2~3299 X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=commitdiff_plain;h=e12ed5279a2e34ae9d7fc2b32c853615e8f9f592 registry: close regdb in error path (and use it) in init_registry(). Michael (This used to be commit 73b325fe7a9d7fd67ac9b99144a3776f5a1a9e15) --- diff --git a/source3/registry/reg_init_full.c b/source3/registry/reg_init_full.c index 5c59c6ba967..f9c982027e5 100644 --- a/source3/registry/reg_init_full.c +++ b/source3/registry/reg_init_full.c @@ -78,7 +78,7 @@ bool init_registry( void ) if ( !init_registry_data() ) { DEBUG(0,("regdb_init: Failed to initialize data in registry!\n")); - return false; + goto fail; } /* build the cache tree of registry hooks */ @@ -99,12 +99,11 @@ bool init_registry( void ) eventlog_init_keys(); perfcount_init_keys(); - /* close and let each smbd open up as necessary */ - - regdb_close(); ret = true; fail: + /* close and let each smbd open up as necessary */ + regdb_close(); TALLOC_FREE(frame); return ret; }