mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Return an SQLITE_NOMEM error if the locking mutex fails to allocate.
FossilOrigin-Name: 1c94834879be0601ac40ef3c4fb1b140f7737e89af7808f2f1db4ceb3daae19f
This commit is contained in:
@@ -1373,7 +1373,13 @@ static int findInodeInfo(
|
||||
}
|
||||
memset(pInode, 0, sizeof(*pInode));
|
||||
memcpy(&pInode->fileId, &fileId, sizeof(fileId));
|
||||
pInode->pLockMutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
|
||||
if( sqlite3GlobalConfig.bCoreMutex ){
|
||||
pInode->pLockMutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
|
||||
if( pInode->pLockMutex==0 ){
|
||||
sqlite3_free(pInode);
|
||||
return SQLITE_NOMEM_BKPT;
|
||||
}
|
||||
}
|
||||
pInode->nRef = 1;
|
||||
pInode->pNext = inodeList;
|
||||
pInode->pPrev = 0;
|
||||
|
||||
Reference in New Issue
Block a user