summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/spinlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/tdb/spinlock.c')
-rw-r--r--source4/lib/tdb/spinlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/tdb/spinlock.c b/source4/lib/tdb/spinlock.c
index 2370ce3bdd..3fddeafb2c 100644
--- a/source4/lib/tdb/spinlock.c
+++ b/source4/lib/tdb/spinlock.c
@@ -372,7 +372,7 @@ int tdb_create_rwlocks(int fd, unsigned int hash_size)
unsigned size, i;
tdb_rwlock_t *rwlocks;
- size = (hash_size + 1) * sizeof(tdb_rwlock_t);
+ size = TDB_SPINLOCK_SIZE(hash_size);
rwlocks = malloc(size);
if (!rwlocks)
return -1;