diff options
author | drh <> | 2021-04-19 20:36:13 +0000 |
---|---|---|
committer | drh <> | 2021-04-19 20:36:13 +0000 |
commit | 8c6cb1bc6f2bb3bd814b6d4c7cd11aad4186c41d (patch) | |
tree | 7c00f8c883b3fd82489d05a572b42fb99e77f216 /src/select.c | |
parent | 5e8e7464d0c325a3c669079c65af250b67eb2944 (diff) | |
download | sqlite-8c6cb1bc6f2bb3bd814b6d4c7cd11aad4186c41d.tar.gz sqlite-8c6cb1bc6f2bb3bd814b6d4c7cd11aad4186c41d.zip |
Improvement to check-in [d564d8882ef18b55] to detect the OOM fault even
if it occurs deep down inside the duplicated expression.
FossilOrigin-Name: 3e863cd09355abd80c1053d6d4dabb55841f806e3c418f923d67d36bf8313cb0
Diffstat (limited to 'src/select.c')
-rw-r--r-- | src/select.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/select.c b/src/select.c index 176115689..92c2ecf8f 100644 --- a/src/select.c +++ b/src/select.c @@ -3627,7 +3627,10 @@ static Expr *substExpr( } testcase( ExprHasProperty(pCopy, EP_Subquery) ); pNew = sqlite3ExprDup(db, pCopy, 0); - if( pNew==0 ) return pExpr; + if( db->mallocFailed ){ + sqlite3ExprDelete(db, pNew); + return pExpr; + } if( pSubst->isLeftJoin ){ ExprSetProperty(pNew, EP_CanBeNull); } |