diff options
author | danielk1977 <danielk1977@noemail.net> | 2007-12-13 19:15:02 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2007-12-13 19:15:02 +0000 |
commit | 31da1d796b8711e3968fd43bdb8da4b21cc32a98 (patch) | |
tree | ea27d29c4a864945be7aeb62989b086d93681307 /src | |
parent | f78fbded4cbf819b4edfc98826e6edf1de6c0e3b (diff) | |
download | sqlite-31da1d796b8711e3968fd43bdb8da4b21cc32a98.tar.gz sqlite-31da1d796b8711e3968fd43bdb8da4b21cc32a98.zip |
Fix a memory leak that can occur following a malloc() failure. (CVS 4628)
FossilOrigin-Name: 993a213024964f4411a9c25c10810543c8089d07
Diffstat (limited to 'src')
-rw-r--r-- | src/select.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/select.c b/src/select.c index 02ec69740..ced5883c9 100644 --- a/src/select.c +++ b/src/select.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle SELECT statements in SQLite. ** -** $Id: select.c,v 1.368 2007/12/13 07:58:51 danielk1977 Exp $ +** $Id: select.c,v 1.369 2007/12/13 19:15:03 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -1465,6 +1465,7 @@ static int matchOrderByTermToExprList( sqlite3 *db = pParse->db; char *zCol = sqlite3NameFromToken(db, &pE->token); if( db->mallocFailed ){ + sqlite3_free(zCol); return -1; } for(i=0; i<pEList->nExpr; i++){ |