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

Fix a case in the pager where an xFetch() reference was being leaked following an OOM error.

FossilOrigin-Name: 5885ba6ce768658ec25b60747430d147b315b55c
This commit is contained in:
dan
2013-03-25 13:50:49 +00:00
parent f23da96636
commit a1afc7425a
5 changed files with 11 additions and 11 deletions

View File

@@ -3870,6 +3870,7 @@ static int pagerAcquireMapPage(
}else{
*ppPage = p = (PgHdr *)sqlite3MallocZero(sizeof(PgHdr) + pPager->nExtra);
if( p==0 ){
sqlite3OsUnfetch(pPager->fd, pData);
return SQLITE_NOMEM;
}
p->pExtra = (void *)&p[1];