mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Make sure nested queries with USING clauses do not leak memory.
Preliminary fix for ticket #3911. (CVS 6750) FossilOrigin-Name: bd341a103c25395b1189d05edebfe4af8a943941
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.523 2009/06/01 16:53:10 shane Exp $
|
||||
** $Id: select.c,v 1.524 2009/06/12 03:27:27 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -2797,6 +2797,7 @@ static int flattenSubquery(
|
||||
** outer query.
|
||||
*/
|
||||
for(i=0; i<nSubSrc; i++){
|
||||
sqlite3IdListDelete(db, pSrc->a[i+iFrom].pUsing);
|
||||
pSrc->a[i+iFrom] = pSubSrc->a[i];
|
||||
memset(&pSubSrc->a[i], 0, sizeof(pSubSrc->a[i]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user