aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vdbeapi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c
index 6f827ec6e..6cbc95459 100644
--- a/src/vdbeapi.c
+++ b/src/vdbeapi.c
@@ -299,9 +299,10 @@ static int sqlite3Step(Vdbe *p){
return SQLITE_MISUSE;
}
- /* Assert that malloc() has not failed */
+ /* Check that malloc() has not failed. If it has, return early. */
db = p->db;
if( db->mallocFailed ){
+ p->rc = SQLITE_NOMEM;
return SQLITE_NOMEM;
}