r23575: Fix a segfault when lp_load is called before init_registry.
authorMichael Adam <obnox@samba.org>
Thu, 21 Jun 2007 20:56:56 +0000 (20:56 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:23:31 +0000 (12:23 -0500)
Michael

source/param/loadparm.c

index 5255c95c27f3e7ecb513b315cb70bd56fb8c80a8..ed77cfda43505f8da243fa97087077afa821b3c7 100644 (file)
@@ -3071,6 +3071,7 @@ static struct tdb_wrap *lp_regdb_open(void)
        if (!reg_tdb) {
                DEBUG(0, ("lp_regdb_open: failed to open %s: %s\n",
                         lock_path("registry.tdb"), strerror(errno)));
+               goto done;
        }
        else {
                DEBUG(10, ("lp_regdb_open: reg tdb opened.\n"));
@@ -3085,6 +3086,7 @@ static struct tdb_wrap *lp_regdb_open(void)
                /* this is apparently not implemented in the tdb */
        }
 
+done:
        return reg_tdb;
 }