summaryrefslogtreecommitdiff
path: root/source3/tdb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/tdb')
-rw-r--r--source3/tdb/tdb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c
index ab50f40ef6..c414ae0d31 100644
--- a/source3/tdb/tdb.c
+++ b/source3/tdb/tdb.c
@@ -1954,6 +1954,8 @@ int tdb_lockkeys(TDB_CONTEXT *tdb, u32 number, TDB_DATA keys[])
void tdb_unlockkeys(TDB_CONTEXT *tdb)
{
u32 i;
+ if (!tdb->lockedkeys)
+ return;
for (i = 0; i < tdb->lockedkeys[0]; i++)
tdb_unlock(tdb, tdb->lockedkeys[i+1], F_WRLCK);
SAFE_FREE(tdb->lockedkeys);