summaryrefslogtreecommitdiff
path: root/source3/tdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-12-05 03:44:30 +0000
committerJeremy Allison <jra@samba.org>2000-12-05 03:44:30 +0000
commit1cd8538b7abf0970082074d7a114bb9d013d00b2 (patch)
tree837131da08e99c8af1fb292e3421363bfa06ca01 /source3/tdb
parent1218b4147488a081182e910cdcd60e123db043a8 (diff)
downloadsamba-1cd8538b7abf0970082074d7a114bb9d013d00b2.tar.gz
samba-1cd8538b7abf0970082074d7a114bb9d013d00b2.tar.bz2
samba-1cd8538b7abf0970082074d7a114bb9d013d00b2.zip
Fixed one tdb_read -> rec_free_read call.
Jeremy. (This used to be commit c9884e16fc2d13dd62c5a43633c9a38dadc9822c)
Diffstat (limited to 'source3/tdb')
-rw-r--r--source3/tdb/tdb.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c
index 8266cb4b4d..d142649adf 100644
--- a/source3/tdb/tdb.c
+++ b/source3/tdb/tdb.c
@@ -4,6 +4,7 @@
Samba database functions
Copyright (C) Andrew Tridgell 1999-2000
Copyright (C) Luke Kenneth Casson Leighton 2000
+ Copyright (C) Jeremy Allison 2000
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -434,16 +435,7 @@ static int tdb_free(TDB_CONTEXT *tdb, tdb_off rec_offset, struct list_struct *re
curr_offset = curr_rec.next;
- if (tdb_read(tdb, curr_offset, (char *)&curr_rec, sizeof(struct list_struct)) == -1) {
- goto fail;
- }
-
- if (curr_rec.magic != TDB_FREE_MAGIC) {
-#if TDB_DEBUG
- printf("bad magic in freelist 0x%08x at offset %d\n",
- curr_rec.magic, curr_offset);
-#endif
- tdb->ecode = TDB_ERR_CORRUPT;
+ if (rec_free_read(tdb, curr_offset, &curr_rec) == -1) {
goto fail;
}
}