summaryrefslogtreecommitdiffstats
path: root/source/tdb
diff options
context:
space:
mode:
Diffstat (limited to 'source/tdb')
-rw-r--r--source/tdb/tdb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/tdb/tdb.c b/source/tdb/tdb.c
index 14e1d4a24f7..1118ad9c67a 100644
--- a/source/tdb/tdb.c
+++ b/source/tdb/tdb.c
@@ -419,7 +419,8 @@ static int rec_free_read(TDB_CONTEXT *tdb, tdb_off off, struct list_struct *rec)
TDB_LOG((tdb, 0,"rec_free_read non-free magic at offset=%d - fixing\n",
rec->magic, off));
rec->magic = TDB_FREE_MAGIC;
- tdb_write(tdb, off, rec, sizeof(*rec));
+ if (tdb_write(tdb, off, rec, sizeof(*rec)) == -1)
+ return -1;
}
if (rec->magic != TDB_FREE_MAGIC) {