registry: close regdb in error path (and use it) in init_registry().
authorMichael Adam <obnox@samba.org>
Sat, 22 Mar 2008 00:49:21 +0000 (01:49 +0100)
committerMichael Adam <obnox@samba.org>
Sat, 22 Mar 2008 00:49:21 +0000 (01:49 +0100)
Michael
(This used to be commit 73b325fe7a9d7fd67ac9b99144a3776f5a1a9e15)

source3/registry/reg_init_full.c

index 5c59c6ba9678ac3ae4f59fa0998bc0188ecf9797..f9c982027e5f5a35ee7acaf689090a50f2dec84e 100644 (file)
@@ -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;
 }