1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Another attempt at fixing a memory leak in the TCL interface.

See check-in (4338) for the first attempt.  Ticket #2597. (CVS 4540)

FossilOrigin-Name: 68a43c99f1b02b8a93bfdcd5c8426b2b4199d68f
This commit is contained in:
drh
2007-11-12 17:56:42 +00:00
parent 0318d4414d
commit 1c96cac1cc
3 changed files with 11 additions and 9 deletions

View File

@@ -12,7 +12,7 @@
** A TCL Interface to SQLite. Append this file to sqlite3.c and
** compile the whole thing to build a TCL-enabled version of SQLite.
**
** $Id: tclsqlite.c,v 1.204 2007/10/23 08:17:48 danielk1977 Exp $
** $Id: tclsqlite.c,v 1.205 2007/11/12 17:56:43 drh Exp $
*/
#include "tcl.h"
#include <errno.h>
@@ -1646,8 +1646,10 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
for(i=0; i<nCol; i++){
Tcl_ListObjAppendElement(interp, pColList, apColName[i]);
}
Tcl_IncrRefCount(pStar);
Tcl_ObjSetVar2(interp, pArray, pStar, pColList,0);
Tcl_DecrRefCount(pColList);
Tcl_DecrRefCount(pStar);
}
/* Execute the SQL