Index: src/expr.c ================================================================== --- src/expr.c +++ src/expr.c @@ -10,11 +10,11 @@ ** ************************************************************************* ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** -** $Id: expr.c,v 1.297 2007/06/08 00:20:48 drh Exp $ +** $Id: expr.c,v 1.298 2007/06/15 16:37:29 danielk1977 Exp $ */ #include "sqliteInt.h" #include /* @@ -1145,10 +1145,12 @@ pDup = sqlite3ExprDup(pEList->a[j].pExpr); if( pExpr->flags & EP_ExpCollate ){ pDup->pColl = pExpr->pColl; pDup->flags |= EP_ExpCollate; } + if( pExpr->span.dyn ) sqliteFree((char*)pExpr->span.z); + if( pExpr->token.dyn ) sqliteFree((char*)pExpr->token.z); memcpy(pExpr, pDup, sizeof(*pExpr)); sqliteFree(pDup); cnt = 1; assert( zTab==0 && zDb==0 ); goto lookupname_end_2;