From 510ba543ccf8ab4c58a18e35c2f63df5de49d0c3 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 21 Jun 2007 20:56:56 +0000 Subject: r23575: Fix a segfault when lp_load is called before init_registry. Michael (This used to be commit 235a5ae4cdf3ea238728c2e89a4318c18257426a) --- source3/param/loadparm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/param') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 5255c95c27..ed77cfda43 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -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; } -- cgit