summaryrefslogtreecommitdiffstats
path: root/source/lib/gencache.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-01-13 18:45:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:06 -0500
commit68399ce04ca4509d51950d2d7b1ed817e82bf17c (patch)
tree828f38f047bdb1f9be90eb7b92e6b84010b4996a /source/lib/gencache.c
parenta77e02177dcefaaccf863aa8d237ea35a2ec52d1 (diff)
downloadsamba-68399ce04ca4509d51950d2d7b1ed817e82bf17c.tar.gz
samba-68399ce04ca4509d51950d2d7b1ed817e82bf17c.tar.xz
samba-68399ce04ca4509d51950d2d7b1ed817e82bf17c.zip
r12912: patch from Tony Mountifield <tony@softins.co.uk> for BUG 3327 (fix bad access to gencache.tdb after fork() in smbmount
Diffstat (limited to 'source/lib/gencache.c')
-rw-r--r--source/lib/gencache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/lib/gencache.c b/source/lib/gencache.c
index 85599c92d33..fd44616270c 100644
--- a/source/lib/gencache.c
+++ b/source/lib/gencache.c
@@ -83,10 +83,13 @@ BOOL gencache_init(void)
BOOL gencache_shutdown(void)
{
+ int ret;
/* tdb_close routine returns -1 on error */
if (!cache) return False;
DEBUG(5, ("Closing cache file\n"));
- return tdb_close(cache) != -1;
+ ret = tdb_close(cache);
+ cache = NULL;
+ return ret != -1;
}