From 2c3fd8a13e7dde23a23404cd88078a04c8b338ea Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 11 Dec 2012 21:04:58 +0100 Subject: 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 Reviewed-by: Stefan Metzmacher --- lib/tdb/common/freelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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; } -- cgit