mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-21 09:00:59 +03:00
Fix a potential NULL-pointer dereference following an OOM error
in the query planner logic for virtual tables with OR-connected terms. FossilOrigin-Name: 71b6c26053fdf2a5a84116e005bad1f2ca873a66
This commit is contained in:
@@ -3665,7 +3665,8 @@ static void bestIndex(WhereBestIdx *p){
|
||||
sqlite3_index_info *pIdxInfo = 0;
|
||||
p->ppIdxInfo = &pIdxInfo;
|
||||
bestVirtualIndex(p);
|
||||
if( pIdxInfo->needToFreeIdxStr ){
|
||||
assert( pIdxInfo!=0 || p->pParse->db->mallocFailed );
|
||||
if( pIdxInfo && pIdxInfo->needToFreeIdxStr ){
|
||||
sqlite3_free(pIdxInfo->idxStr);
|
||||
}
|
||||
sqlite3DbFree(p->pParse->db, pIdxInfo);
|
||||
|
||||
Reference in New Issue
Block a user