summaryrefslogtreecommitdiff
path: root/source3/tdb/spinlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/tdb/spinlock.c')
-rw-r--r--source3/tdb/spinlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/tdb/spinlock.c b/source3/tdb/spinlock.c
index 2370ce3bdd..3fddeafb2c 100644
--- a/source3/tdb/spinlock.c
+++ b/source3/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;