summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-12-11 21:04:58 +0100
committerStefan Metzmacher <metze@samba.org>2012-12-21 11:54:33 +0100
commit2c3fd8a13e7dde23a23404cd88078a04c8b338ea (patch)
tree3e1b56268cb8f67306b367efc6a07351f6e01b31 /lib
parent2148d86c7a2facd6e128b753aef98722843af3e1 (diff)
downloadsamba-2c3fd8a13e7dde23a23404cd88078a04c8b338ea.tar.gz
samba-2c3fd8a13e7dde23a23404cd88078a04c8b338ea.tar.bz2
samba-2c3fd8a13e7dde23a23404cd88078a04c8b338ea.zip
tdb: Fix a missing CONVERT
methods->tdb_write expects data in on-disk format. For reading that record, methods->tdb_read() has taken care of the on-disk to in-memory representation according to the DOCONV() flag passed down. tdb_rec_write() is a wrapper around methods->tdb_write just doing the CONVERT() on the way to disk. Reviewed-by: Rusty Russell <rusty@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/tdb/common/freelist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tdb/common/freelist.c b/lib/tdb/common/freelist.c
index 6358f64a04..5312c2a978 100644
--- a/lib/tdb/common/freelist.c
+++ b/lib/tdb/common/freelist.c
@@ -45,7 +45,7 @@ int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off, struct tdb_record
TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_rec_free_read non-free magic 0x%x at offset=%d - fixing\n",
rec->magic, off));
rec->magic = TDB_FREE_MAGIC;
- if (tdb->methods->tdb_write(tdb, off, rec, sizeof(*rec)) == -1)
+ if (tdb_rec_write(tdb, off, rec) == -1)
return -1;
}