mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Add a linked list of ParseCleanup objects to the end of a Parse object and
use that list as a place to put other sub-objects that need to be deallocated. Have a single such list for infrequently used sub-objects is more efficient than doing an a separate check for each kind of sub-object. FossilOrigin-Name: affa2b7b316941b8a6c4d0d1ff212c81a593faf1d05d129e14d2b70d73a25c59
This commit is contained in:
@@ -371,6 +371,7 @@ static int autoIncBegin(
|
||||
if( pInfo==0 ){
|
||||
pInfo = sqlite3DbMallocRawNN(pParse->db, sizeof(*pInfo));
|
||||
if( pInfo==0 ) return 0;
|
||||
sqlite3ParserAddCleanup(pToplevel, sqlite3DbFreeNN, pInfo);
|
||||
pInfo->pNext = pToplevel->pAinc;
|
||||
pToplevel->pAinc = pInfo;
|
||||
pInfo->pTab = pTab;
|
||||
|
||||
Reference in New Issue
Block a user