/ Check-in [68a43c99]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Another attempt at fixing a memory leak in the TCL interface. See check-in (4338) for the first attempt. Ticket #2597. (CVS 4540)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 68a43c99f1b02b8a93bfdcd5c8426b2b4199d68f
User & Date: drh 2007-11-12 17:56:43
Context
2007-11-12
21:09
Various changes to enable compilation of SQLite library and command line shell with the Windows CE cross compiler from cegcc.sourceforge.net (CVS 4541) check-in: 8ad0ab8c user: chw tags: trunk
17:56
Another attempt at fixing a memory leak in the TCL interface. See check-in (4338) for the first attempt. Ticket #2597. (CVS 4540) check-in: 68a43c99 user: drh tags: trunk
15:40
Fix a code comment in select.c. No code changes. (CVS 4539) check-in: cf41d6a0 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/tclsqlite.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** A TCL Interface to SQLite.  Append this file to sqlite3.c and
    13     13   ** compile the whole thing to build a TCL-enabled version of SQLite.
    14     14   **
    15         -** $Id: tclsqlite.c,v 1.204 2007/10/23 08:17:48 danielk1977 Exp $
           15  +** $Id: tclsqlite.c,v 1.205 2007/11/12 17:56:43 drh Exp $
    16     16   */
    17     17   #include "tcl.h"
    18     18   #include <errno.h>
    19     19   
    20     20   /*
    21     21   ** Some additional include files are needed if this file is not
    22     22   ** appended to the amalgamation.
................................................................................
  1642   1642         if( pArray ){
  1643   1643           Tcl_Obj *pColList = Tcl_NewObj();
  1644   1644           Tcl_Obj *pStar = Tcl_NewStringObj("*", -1);
  1645   1645           Tcl_IncrRefCount(pColList);
  1646   1646           for(i=0; i<nCol; i++){
  1647   1647             Tcl_ListObjAppendElement(interp, pColList, apColName[i]);
  1648   1648           }
         1649  +        Tcl_IncrRefCount(pStar);
  1649   1650           Tcl_ObjSetVar2(interp, pArray, pStar, pColList,0);
  1650   1651           Tcl_DecrRefCount(pColList);
         1652  +        Tcl_DecrRefCount(pStar);
  1651   1653         }
  1652   1654   
  1653   1655         /* Execute the SQL
  1654   1656         */
  1655   1657         while( rc==TCL_OK && pStmt && SQLITE_ROW==sqlite3_step(pStmt) ){
  1656   1658           for(i=0; i<nCol; i++){
  1657   1659             Tcl_Obj *pVal;