aboutsummaryrefslogtreecommitdiff
path: root/src/trigger.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2004-06-22 13:22:40 +0000
committerdrh <drh@noemail.net>2004-06-22 13:22:40 +0000
commit645f63ed02f246e9c8d853c39db1cfd46ae0528b (patch)
treec928059ee55cedbfd19fdb4f3b878946bf68e68b /src/trigger.c
parentd1e3bee1a057a940a92e0af24380a6ae72318e56 (diff)
downloadsqlite-645f63ed02f246e9c8d853c39db1cfd46ae0528b.tar.gz
sqlite-645f63ed02f246e9c8d853c39db1cfd46ae0528b.zip
Fix some segfaults that could have occurred after a malloc() failure. (CVS 1661)
FossilOrigin-Name: 80151e728101c3cd5a8cf36cca2bfa661b21c746
Diffstat (limited to 'src/trigger.c')
-rw-r--r--src/trigger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/trigger.c b/src/trigger.c
index a10474f0b..b0dcc4c27 100644
--- a/src/trigger.c
+++ b/src/trigger.c
@@ -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;