mirror of
https://github.com/sqlite/sqlite.git
synced 2025-12-09 10:21:35 +03:00
Avoid leaking Index.aiRowEst memory if an OOM causes a rollback which deletes
the index before the aiRowEst deletion code in sqlite3AnalysisLoad() routine has a chance to run. Since the aiRowEst now might be deleted from freeIndex() which does not always have a db pointer, make sure the aiRowEst memory is not held in lookaside. FossilOrigin-Name: efd87ba142723ba131fcc985db6eb45c5a3c637b
This commit is contained in:
@@ -435,6 +435,9 @@ static void freeIndex(sqlite3 *db, Index *p){
|
||||
sqlite3ExprDelete(db, p->pPartIdxWhere);
|
||||
sqlite3DbFree(db, p->zColAff);
|
||||
if( p->isResized ) sqlite3DbFree(db, p->azColl);
|
||||
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
|
||||
sqlite3_free(p->aiRowEst);
|
||||
#endif
|
||||
sqlite3DbFree(db, p);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user