summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/locking/brlock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index d8dcc6f642..8e2f7ce41a 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -1482,8 +1482,11 @@ static int traverse_fn(struct db_record *rec, void *state)
}
if (orig_num_locks != num_locks) {
- if (rec->value.dsize) {
- rec->store(rec, rec->value, TDB_REPLACE);
+ if (num_locks) {
+ TDB_DATA data;
+ data.dptr = (uint8_t *)locks;
+ data.dsize = num_locks*sizeof(struct lock_struct);
+ rec->store(rec, data, TDB_REPLACE);
} else {
rec->delete_rec(rec);
}