aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/insert.c4
-rw-r--r--src/select.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/src/insert.c b/src/insert.c
index 2029f19c4..3720af60e 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle INSERT statements in SQLite.
**
-** $Id: insert.c,v 1.196 2007/12/14 15:12:21 drh Exp $
+** $Id: insert.c,v 1.197 2007/12/14 16:11:09 drh Exp $
*/
#include "sqliteInt.h"
@@ -110,7 +110,7 @@ static int readsTable(Vdbe *v, int iStartAddr, int iDb, Table *pTab){
int iEnd = sqlite3VdbeCurrentAddr(v);
for(i=iStartAddr; i<iEnd; i++){
VdbeOp *pOp = sqlite3VdbeGetOp(v, i);
- assert( pOp==0 );
+ assert( pOp!=0 );
if( pOp->opcode==OP_OpenRead ){
VdbeOp *pPrior = &pOp[-1];
int tnum = pOp->p2;
diff --git a/src/select.c b/src/select.c
index dd577f35e..ffaab786c 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.370 2007/12/13 21:54:11 drh Exp $
+** $Id: select.c,v 1.371 2007/12/14 16:11:09 drh Exp $
*/
#include "sqliteInt.h"
@@ -1464,8 +1464,7 @@ static int matchOrderByTermToExprList(
if( pE->op==TK_ID || (pE->op==TK_STRING && pE->token.z[0]!='\'') ){
sqlite3 *db = pParse->db;
char *zCol = sqlite3NameFromToken(db, &pE->token);
- if( db->mallocFailed ){
- sqlite3_free(zCol);
+ if( zCol==0 ){
return -1;
}
for(i=0; i<pEList->nExpr; i++){