aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <dan@noemail.net>2016-01-28 18:22:46 +0000
committerdan <dan@noemail.net>2016-01-28 18:22:46 +0000
commit895c00e16a0308b0e0fc9fb49c1c6fdc8713af46 (patch)
treeff4d7140f8fd098ce80e9180cc9996ba807b8870 /src
parentd5cafb380e588ac0b2f18bfaa2008c9a90fb5996 (diff)
downloadsqlite-895c00e16a0308b0e0fc9fb49c1c6fdc8713af46.tar.gz
sqlite-895c00e16a0308b0e0fc9fb49c1c6fdc8713af46.zip
Modify the order of terms in an "if" condition to avoid implicitly comparing a dangling pointer to NULL following an OOM error.
FossilOrigin-Name: 5372f800835da61736a64dcee8b476bbe7ee2e46
Diffstat (limited to 'src')
-rw-r--r--src/parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse.y b/src/parse.y
index d6a587a2c..846c2504b 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -1010,7 +1010,7 @@ expr(A) ::= expr(X) NOT NULL(E). {spanUnaryPostfix(&A,pParse,TK_NOTNULL,&X,&E);}
** unary TK_ISNULL or TK_NOTNULL expression. */
static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){
sqlite3 *db = pParse->db;
- if( pY && pA && pY->op==TK_NULL ){
+ if( pA && pY && pY->op==TK_NULL ){
pA->op = (u8)op;
sqlite3ExprDelete(db, pA->pRight);
pA->pRight = 0;