summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/gencache.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index da8808af16..39e727c24f 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -357,6 +357,9 @@ void gencache_iterate(void (*fn)(const char* key, const char *value, time_t time
int gencache_lock_entry( const char *key )
{
+ if (!gencache_init())
+ return -1;
+
return tdb_lock_bystring(cache, key, 0);
}
@@ -366,6 +369,9 @@ int gencache_lock_entry( const char *key )
void gencache_unlock_entry( const char *key )
{
+ if (!gencache_init())
+ return;
+
tdb_unlock_bystring(cache, key);
return;
}