summaryrefslogtreecommitdiffstats
path: root/lib/tdb
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2014-02-13 17:03:46 +0100
committerJeremy Allison <jra@samba.org>2014-02-15 03:21:07 +0100
commit41b7acacb304a023deca717930fc4dda15565226 (patch)
tree65ca4d9c36e5b6b56f728bb972bed267f38cb8b0 /lib/tdb
parentcde8e290c9195cbc7a2388455df9e76a1f36135f (diff)
downloadsamba-41b7acacb304a023deca717930fc4dda15565226.tar.gz
samba-41b7acacb304a023deca717930fc4dda15565226.tar.xz
samba-41b7acacb304a023deca717930fc4dda15565226.zip
tdb: in tdb_delete_hash, make lock/unlock bracket more obvious
by using the same variable as hash as in the lock. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Feb 15 03:21:07 CET 2014 on sn-devel-104
Diffstat (limited to 'lib/tdb')
-rw-r--r--lib/tdb/common/tdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tdb/common/tdb.c b/lib/tdb/common/tdb.c
index f24493ccd84..1e41e84c82a 100644
--- a/lib/tdb/common/tdb.c
+++ b/lib/tdb/common/tdb.c
@@ -421,7 +421,7 @@ static int tdb_delete_hash(struct tdb_context *tdb, TDB_DATA key, uint32_t hash)
tdb_increment_seqnum(tdb);
}
- if (tdb_unlock(tdb, BUCKET(rec.full_hash), F_WRLCK) != 0)
+ if (tdb_unlock(tdb, BUCKET(hash), F_WRLCK) != 0)
TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_delete: WARNING tdb_unlock failed!\n"));
return ret;
}