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

Take care to free the memory for the ORDER BY clause on SELECT statements

containing errors and contained within triggers.  Ticket #3863. (CVS 6644)

FossilOrigin-Name: dd665eac8c04259e44a95827ebd1f037460fe1b2
This commit is contained in:
drh
2009-05-17 15:26:20 +00:00
parent 554b3830db
commit 03949bac60
4 changed files with 26 additions and 11 deletions

View File

@@ -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.514 2009/05/17 02:06:15 drh Exp $
** $Id: select.c,v 1.515 2009/05/17 15:26:21 drh Exp $
*/
#include "sqliteInt.h"
@@ -3575,12 +3575,12 @@ int sqlite3Select(
p->selFlags &= ~SF_Distinct;
}
sqlite3SelectPrep(pParse, p, 0);
p->pOrderBy = pOrderBy;
pTabList = p->pSrc;
pEList = p->pEList;
if( pParse->nErr || db->mallocFailed ){
goto select_end;
}
p->pOrderBy = pOrderBy;
isAgg = (p->selFlags & SF_Aggregate)!=0;
if( pEList==0 ) goto select_end;