1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Fix a memory leak in triggers and update tests to show the latest error

message text. (CVS 886)

FossilOrigin-Name: b90d9de32d10a71fe81f5bfd0cf57faae8c5c3b4
This commit is contained in:
drh
2003-03-30 00:19:49 +00:00
parent 812d7a21dd
commit 0be9df076a
7 changed files with 43 additions and 25 deletions

View File

@@ -171,6 +171,7 @@ void sqliteCreateTrigger(
/* Attach it to the table object */
nt->pNext = tab->pTrigger;
tab->pTrigger = nt;
sqliteSrcListDelete(pTableName);
return;
}else{
sqliteFree(nt->name);
@@ -380,7 +381,7 @@ void sqliteDropTrigger(Parse *pParse, SrcList *pName, int nested){
if( pTable->iDb ) code = SQLITE_DROP_TEMP_TRIGGER;
if( sqliteAuthCheck(pParse, code, pTrigger->name, pTable->zName) ||
sqliteAuthCheck(pParse, SQLITE_DELETE, SCHEMA_TABLE(pTable->iDb),0) ){
return;
goto drop_trigger_cleanup;
}
}
#endif