diff options
author | Tim Potter <tpot@samba.org> | 2003-03-13 06:54:10 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-03-13 06:54:10 +0000 |
commit | 14672bed8f48978f5e8b5627823f35767e84ce9b (patch) | |
tree | 7296ddeee3e1320d9bfc1480caf233d0e7e3120b /source3/tdb | |
parent | 9c9384b774474ec1a754e999c9652437dc44cf3a (diff) | |
download | samba-14672bed8f48978f5e8b5627823f35767e84ce9b.tar.gz samba-14672bed8f48978f5e8b5627823f35767e84ce9b.tar.xz samba-14672bed8f48978f5e8b5627823f35767e84ce9b.zip |
Merge of tdb_unlockeys() crash fix.
(This used to be commit 0eee7a4b1ea437b5f1376fc9c7063b117f5027c6)
Diffstat (limited to 'source3/tdb')
-rw-r--r-- | source3/tdb/tdb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c index 0ec770ed81a..442baed9362 100644 --- a/source3/tdb/tdb.c +++ b/source3/tdb/tdb.c @@ -1933,6 +1933,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); |