registry: fix registry_init_smbconf() to close the registry at the end.
authorMichael Adam <obnox@samba.org>
Fri, 21 Mar 2008 22:50:49 +0000 (23:50 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 21 Mar 2008 22:50:49 +0000 (23:50 +0100)
Michael

source/lib/smbconf/smbconf_reg.c
source/registry/reg_init_smbconf.c

index 1f113c835ff1bd3cb43de2a4ce3cc83a0b4cefa2..77e6233cb4036f0803e4970b9d60e8e852caba89 100644 (file)
@@ -418,8 +418,6 @@ static WERROR smbconf_reg_init(struct smbconf_ctx *ctx, const char *path)
                werr = WERR_REG_IO_FAILURE;
                goto done;
        }
-       /* we know registry_init_smbconf() leaves registry open */
-       regdb_close();
 
 done:
        return werr;
index 1b17852a7a14d9acb41f1978807644403bdb3c71..71f21f85ece1628bf75c141ccadb035c8127469c 100644 (file)
@@ -95,6 +95,8 @@ bool registry_init_smbconf(void)
                goto done;
        }
 
+       regdb_close();
+
        ret = true;
 
 done: