1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Fix some segfaults that could have occurred after a malloc() failure. (CVS 1661)

FossilOrigin-Name: 80151e728101c3cd5a8cf36cca2bfa661b21c746
This commit is contained in:
drh
2004-06-22 13:22:40 +00:00
parent d1e3bee1a0
commit 645f63ed02
6 changed files with 17 additions and 30 deletions

View File

@@ -79,7 +79,7 @@ void sqlite3BeginTrigger(
** If sqlite3SrcListLookup() returns 0, indicating the table does not
** exist, the error is caught by the block below.
*/
if( !pTableName ) goto trigger_cleanup;
if( !pTableName || sqlite3_malloc_failed ) goto trigger_cleanup;
pTab = sqlite3SrcListLookup(pParse, pTableName);
if( pName2->n==0 && pTab && pTab->iDb==1 ){
iDb = 1;