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:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user