From: Howard Chu Date: Tue, 10 Apr 2012 02:24:47 +0000 (-0700) Subject: ITS#7210 fix check for freelist changes X-Git-Tag: OPENLDAP_REL_ENG_2_4_32~125^2~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a66f9e9292069ed01ae0fcf50e8a5bb3d3888935;p=openldap ITS#7210 fix check for freelist changes Was being fooled before because the newly malloc'd block had the same address as the previously freed block. --- diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 46fd2683d7..eddeb5e899 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -1989,7 +1989,7 @@ again: * due to freed overflow pages... */ mdb_cursor_put(&mc, &key, &data, 0); - if (mop == env->me_pghead) { + if (mop == env->me_pghead && env->me_pghead->mo_txnid == id) { /* could have been used again here */ if (mop->mo_pages[0] != orig) { data.mv_size = MDB_IDL_SIZEOF(mop->mo_pages);