aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2007-06-15 16:37:29 +0000
committerdanielk1977 <danielk1977@noemail.net>2007-06-15 16:37:29 +0000
commitedaaec223c971bb83a392f2c3076da5eaa6ae34a (patch)
treee105e569b1ad9ec03d2cf28e070dc005b34bd325 /src/expr.c
parent5bd1bf2ebc18bb3081a6364535114b5e116ef82c (diff)
downloadsqlite-edaaec223c971bb83a392f2c3076da5eaa6ae34a.tar.gz
sqlite-edaaec223c971bb83a392f2c3076da5eaa6ae34a.zip
Fix an obscure memory leak in the SQL compiler.. (CVS 4070)
FossilOrigin-Name: d4ab94288b1e3d3d069ccc75d0fc2fbe6c1383c5
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c
index 5c48c0b5e..b2ff41a79 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.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 <ctype.h>
@@ -1147,6 +1147,8 @@ static int lookupName(
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;