aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2007-08-22 20:18:21 +0000
committerdrh <drh@noemail.net>2007-08-22 20:18:21 +0000
commitf3a65f7e443865f00b6799ba9637604b0ae55dc5 (patch)
tree5fc48b237b66cb49164f136fd222f6a49a21c304 /src/expr.c
parentdd97a49c1a90e31dae5d47ee91e2618eb4b57eb8 (diff)
downloadsqlite-f3a65f7e443865f00b6799ba9637604b0ae55dc5.tar.gz
sqlite-f3a65f7e443865f00b6799ba9637604b0ae55dc5.zip
The malloc.test script now passes all tests with no errors. (CVS 4271)
FossilOrigin-Name: db818430e9ea4ef4a4af575784009d5acae785a3
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/expr.c b/src/expr.c
index e541e7d7d..1d1fb0e18 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
-** $Id: expr.c,v 1.307 2007/08/16 12:24:02 drh Exp $
+** $Id: expr.c,v 1.308 2007/08/22 20:18:22 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -275,8 +275,6 @@ Expr *sqlite3PExpr(
){
Expr *pNew = sqlite3Expr(op, pLeft, pRight, pToken);
if( pNew==0 ){
- sqlite3ExprDelete(pLeft);
- sqlite3ExprDelete(pRight);
pParse->db->mallocFailed = 1;
}
return pNew;
@@ -339,7 +337,7 @@ Expr *sqlite3ExprAnd(sqlite3 *db, Expr *pLeft, Expr *pRight){
void sqlite3ExprSpan(Expr *pExpr, Token *pLeft, Token *pRight){
assert( pRight!=0 );
assert( pLeft!=0 );
- if( pRight->z && pLeft->z ){
+ if( pExpr && pRight->z && pLeft->z ){
assert( pLeft->dyn==0 || pLeft->z[pLeft->n]==0 );
if( pLeft->dyn==0 && pRight->dyn==0 ){
pExpr->span.z = pLeft->z;