aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
-rw-r--r--src/tclsqlite.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index e4c4006af..0bb3496d7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
-** $Id: main.c,v 1.240 2004/06/29 10:53:55 drh Exp $
+** $Id: main.c,v 1.241 2004/06/29 11:26:59 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -981,7 +981,7 @@ int sqlite3_prepare(
char *tmpSql = sqliteStrNDup(zSql, sParse.zTail - zSql);
if( tmpSql ){
db->xTrace(db->pTraceArg, tmpSql);
- free(tmpSql);
+ sqliteFree(tmpSql);
}else{
/* If a memory error occurred during the copy,
** trace entire SQL string and fall through to the
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
index 361aa59db..ab08ad4f1 100644
--- a/src/tclsqlite.c
+++ b/src/tclsqlite.c
@@ -11,7 +11,7 @@
*************************************************************************
** A TCL Interface to SQLite
**
-** $Id: tclsqlite.c,v 1.90 2004/06/21 06:50:28 danielk1977 Exp $
+** $Id: tclsqlite.c,v 1.91 2004/06/29 11:26:59 drh Exp $
*/
#ifndef NO_TCL /* Omit this whole file if TCL is unavailable */
@@ -858,6 +858,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
case DB_TRACE: {
if( objc>3 ){
Tcl_WrongNumArgs(interp, 2, objv, "?CALLBACK?");
+ return TCL_ERROR;
}else if( objc==2 ){
if( pDb->zTrace ){
Tcl_AppendResult(interp, pDb->zTrace, 0);