The malloc.test script now passes all tests with no errors. (CVS 4271)

FossilOrigin-Name: db818430e9ea4ef4a4af575784009d5acae785a3
diff --git a/src/expr.c b/src/expr.c
index e541e7d..1d1fb0e 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 *pNew = sqlite3Expr(op, pLeft, pRight, pToken);
   if( pNew==0 ){
-    sqlite3ExprDelete(pLeft);
-    sqlite3ExprDelete(pRight);
     pParse->db->mallocFailed = 1;
   }
   return pNew;
@@ -339,7 +337,7 @@
 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;