summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/tdb/common/freelist.c2
-rw-r--r--source4/lib/tdb/common/transaction.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/tdb/common/freelist.c b/source4/lib/tdb/common/freelist.c
index 9707295ec3..3483751164 100644
--- a/source4/lib/tdb/common/freelist.c
+++ b/source4/lib/tdb/common/freelist.c
@@ -277,6 +277,8 @@ tdb_off_t tdb_allocate(struct tdb_context *tdb, tdb_len_t length, struct list_st
goto fail;
bestfit.rec_ptr = 0;
+ bestfit.last_ptr = 0;
+ bestfit.rec_len = 0;
/*
this is a best fit allocation strategy. Originally we used
diff --git a/source4/lib/tdb/common/transaction.c b/source4/lib/tdb/common/transaction.c
index fdcba110c2..cf0f378dce 100644
--- a/source4/lib/tdb/common/transaction.c
+++ b/source4/lib/tdb/common/transaction.c
@@ -734,7 +734,7 @@ static int transaction_setup_recovery(struct tdb_context *tdb,
int tdb_transaction_commit(struct tdb_context *tdb)
{
const struct tdb_methods *methods;
- tdb_off_t magic_offset;
+ tdb_off_t magic_offset = 0;
u32 zero = 0;
if (tdb->transaction == NULL) {