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 5339)
FossilOrigin-Name: cec4eba1a105396c5fd5d2b664456f6d6be3f215
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.446 2008/07/02 13:13:52 danielk1977 Exp $
|
||||
** $Id: select.c,v 1.447 2008/07/02 16:10:46 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -2347,7 +2347,6 @@ static int generateOutputSubroutine(
|
||||
Vdbe *v = pParse->pVdbe;
|
||||
int iContinue;
|
||||
int addr;
|
||||
if( pParse->db->mallocFailed ) return 0;
|
||||
|
||||
addr = sqlite3VdbeCurrentAddr(v);
|
||||
iContinue = sqlite3VdbeMakeLabel(v);
|
||||
@@ -2364,6 +2363,7 @@ static int generateOutputSubroutine(
|
||||
sqlite3ExprCodeCopy(pParse, pIn->iMem, regPrev+1, pIn->nMem);
|
||||
sqlite3VdbeAddOp2(v, OP_Integer, 1, regPrev);
|
||||
}
|
||||
if( pParse->db->mallocFailed ) return 0;
|
||||
|
||||
/* Suppress the the first OFFSET entries if there is an OFFSET clause
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user