mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
Fix a memory leak in expression processing. (CVS 414)
FossilOrigin-Name: dfe431c9b70bc3a1bf5148826edce0846737e66b
This commit is contained in:
10
src/expr.c
10
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.52 2002/03/02 17:04:08 drh Exp $
|
||||
** $Id: expr.c,v 1.53 2002/03/03 03:42:31 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -85,10 +85,8 @@ Expr *sqliteExprFunction(ExprList *pList, Token *pToken){
|
||||
*/
|
||||
void sqliteExprDelete(Expr *p){
|
||||
if( p==0 ) return;
|
||||
if( p->op!=TK_AS ){
|
||||
if( p->pLeft ) sqliteExprDelete(p->pLeft);
|
||||
if( p->pRight ) sqliteExprDelete(p->pRight);
|
||||
}
|
||||
if( p->pLeft ) sqliteExprDelete(p->pLeft);
|
||||
if( p->pRight ) sqliteExprDelete(p->pRight);
|
||||
if( p->pList ) sqliteExprListDelete(p->pList);
|
||||
if( p->pSelect ) sqliteSelectDelete(p->pSelect);
|
||||
sqliteFree(p);
|
||||
@@ -409,7 +407,7 @@ int sqliteExprResolveIds(
|
||||
assert( pExpr->pLeft==0 && pExpr->pRight==0 );
|
||||
pExpr->op = TK_AS;
|
||||
pExpr->iColumn = j;
|
||||
pExpr->pLeft = pEList->a[j].pExpr;
|
||||
pExpr->pLeft = sqliteExprDup(pEList->a[j].pExpr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user