summaryrefslogtreecommitdiff
path: root/lib/tdb/common/freelistcheck.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tdb/common/freelistcheck.c')
-rw-r--r--lib/tdb/common/freelistcheck.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/tdb/common/freelistcheck.c b/lib/tdb/common/freelistcheck.c
index efc050df9c..972b2a41c4 100644
--- a/lib/tdb/common/freelistcheck.c
+++ b/lib/tdb/common/freelistcheck.c
@@ -67,7 +67,8 @@ int tdb_validate_freelist(struct tdb_context *tdb, int *pnum_entries)
/* Store the FREELIST_TOP record. */
if (seen_insert(mem_tdb, last_ptr) == -1) {
- ret = TDB_ERRCODE(TDB_ERR_CORRUPT, -1);
+ tdb->ecode = TDB_ERR_CORRUPT;
+ ret = -1;
goto fail;
}
@@ -83,7 +84,8 @@ int tdb_validate_freelist(struct tdb_context *tdb, int *pnum_entries)
be corrupt. */
if (seen_insert(mem_tdb, rec_ptr)) {
- ret = TDB_ERRCODE(TDB_ERR_CORRUPT, -1);
+ tdb->ecode = TDB_ERR_CORRUPT;
+ ret = -1;
goto fail;
}