1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

In the async-IO module, do not increment the open file-counter until after an "open file" event has been added to the event queue. Otherwise, an OOM may cause the system to increment the counter even though no file was successfully opened.

FossilOrigin-Name: 15a190dc5769beb53b89254543e744a964cd86ed
This commit is contained in:
dan
2010-07-12 12:22:29 +00:00
parent 599e9d21bb
commit d846c5e047
3 changed files with 10 additions and 8 deletions

View File

@ -1143,7 +1143,6 @@ static int asyncOpen(
async_mutex_leave(ASYNC_MUTEX_LOCK);
if( rc==SQLITE_OK ){
incrOpenFileCount();
pData->pLock = pLock;
}
@ -1160,7 +1159,10 @@ static int asyncOpen(
}
if( rc!=SQLITE_OK ){
p->pMethod = 0;
}else{
incrOpenFileCount();
}
return rc;
}