mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Fix a memory leak that can occur following a malloc() failure. (CVS 4628)
FossilOrigin-Name: 993a213024964f4411a9c25c10810543c8089d07
This commit is contained in:
@@ -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++){
|
||||
|
||||
Reference in New Issue
Block a user