diff options
author | drh <drh@noemail.net> | 2016-02-05 01:55:27 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-02-05 01:55:27 +0000 |
commit | 4a642b60607e55a2c25f663b472af3609c76b214 (patch) | |
tree | d4af5d6c69d8cde0c32bfcc7a427eb34c2815080 /src/expr.c | |
parent | e514f651d0fb5364e6495b9d6c4dd80ca51a227f (diff) | |
download | sqlite-4a642b60607e55a2c25f663b472af3609c76b214.tar.gz sqlite-4a642b60607e55a2c25f663b472af3609c76b214.zip |
Improvements to the way that OOM errors are processed.
FossilOrigin-Name: c3ef03478a5788c855b3aef385d43ae7f494f440
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c index c91db2834..5b134d666 100644 --- a/src/expr.c +++ b/src/expr.c @@ -699,7 +699,10 @@ void sqlite3ExprAssignVarNumber(Parse *pParse, Expr *pExpr){ if( x>pParse->nzVar ){ char **a; a = sqlite3DbRealloc(db, pParse->azVar, x*sizeof(a[0])); - if( a==0 ) return; /* Error reported through db->mallocFailed */ + if( a==0 ){ + assert( db->mallocFailed ); /* Error reported through mallocFailed */ + return; + } pParse->azVar = a; memset(&a[pParse->nzVar], 0, (x-pParse->nzVar)*sizeof(a[0])); pParse->nzVar = x; |