1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Fix a reference count leak introduced by (5526). (CVS 5527)

FossilOrigin-Name: f653995c32197cacbcd14ea9e876ba5b2fde94df
This commit is contained in:
danielk1977
2008-08-02 17:36:45 +00:00
parent f328bea9da
commit a68468f5b1
3 changed files with 17 additions and 14 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.494 2008/08/02 17:03:32 danielk1977 Exp $
** $Id: btree.c,v 1.495 2008/08/02 17:36:46 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -4571,12 +4571,15 @@ static int reparentPage(
/* If the updatePtrmap flag was clear, assert that the entry in the
** pointer-map is already correct.
*/
if( ISAUTOVACUUM && sqlite3PagerLookup(pBt->pPager,PTRMAP_PAGENO(pBt,pgno)) ){
u8 eType;
Pgno ii;
int rc;
rc = ptrmapGet(pBt, pgno, &eType, &ii);
assert( rc==SQLITE_OK && ii==pNewParent->pgno && eType==PTRMAP_BTREE );
if( ISAUTOVACUUM ){
pDbPage = sqlite3PagerLookup(pBt->pPager,PTRMAP_PAGENO(pBt,pgno));
if( pDbPage ){
u8 eType;
Pgno ii;
int rc = ptrmapGet(pBt, pgno, &eType, &ii);
assert( rc==SQLITE_OK && ii==pNewParent->pgno && eType==PTRMAP_BTREE );
sqlite3PagerUnref(pDbPage);
}
}
#endif