1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Fix an obscure memory leak in the SQL compiler.. (CVS 4070)

FossilOrigin-Name: d4ab94288b1e3d3d069ccc75d0fc2fbe6c1383c5
This commit is contained in:
danielk1977
2007-06-15 16:37:29 +00:00
parent 5bd1bf2ebc
commit edaaec223c
3 changed files with 11 additions and 9 deletions

View File

@@ -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;