1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Fix a Pager ref-count leak in the sqlite_dbpage virtual table.

FossilOrigin-Name: c063bb04da77d6847e4e254b6bb939c860e781382e34ddff8e0454d9db7552e2
This commit is contained in:
drh
2017-10-27 18:24:11 +00:00
parent b4bab90b31
commit 0503f2acfa
4 changed files with 19 additions and 10 deletions

View File

@@ -220,7 +220,7 @@ static int dbpageFilter(
){
DbpageCursor *pCsr = (DbpageCursor *)pCursor;
DbpageTable *pTab = (DbpageTable *)pCursor->pVtab;
int rc = SQLITE_OK;
int rc;
sqlite3 *db = pTab->db;
Btree *pBt;
@@ -254,6 +254,7 @@ static int dbpageFilter(
}else{
assert( pCsr->pgno==1 );
}
if( pCsr->pPage1 ) sqlite3PagerUnrefPageOne(pCsr->pPage1);
rc = sqlite3PagerGet(pCsr->pPager, 1, &pCsr->pPage1, 0);
return rc;
}