diff options
| author | Miguel Sofer <miguel.sofer@gmail.com> | 2005-10-23 22:01:27 (GMT) |
|---|---|---|
| committer | Miguel Sofer <miguel.sofer@gmail.com> | 2005-10-23 22:01:27 (GMT) |
| commit | 64be4c1e63ef85d515bb28afe134159d649353f6 (patch) | |
| tree | c2da79f4e5a542014dab31edea47e6bd46a22b4c /win/tclWinInit.c | |
| parent | ab628d4d6d0cbf74b48df435b3d8a2675cc8a0ee (diff) | |
| download | tcl-64be4c1e63ef85d515bb28afe134159d649353f6.zip tcl-64be4c1e63ef85d515bb28afe134159d649353f6.tar.gz tcl-64be4c1e63ef85d515bb28afe134159d649353f6.tar.bz2 | |
* generic/tclBasic.c:
* generic/tclBinary.c:
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
* generic/tclCmdMZ.c:
* generic/tclExecute.c:
* generic/tclLink.c:
* generic/tclMain.c:
* generic/tclProc.c:
* generic/tclScan.c:
* generic/tclTest.c:
* generic/tclVar.c:
* mac/tclMacInit.c:
* unix/tclUnixInit.c:
* win/tclWinInit.c: Insure that the core never calls TclPtrSetVar,
Tcl_SetVar2Ex, Tcl_ObjSetVar2 or Tcl_SetObjErrorCode with a 0-ref
new value. It is not possible to handle error returns correctly in
that case [Bug 1334947], one has the choice of leaking the object
in some cases, or else risk crashing in some others.
Diffstat (limited to 'win/tclWinInit.c')
| -rw-r--r-- | win/tclWinInit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c index d7ddbb5..7fb65c2 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -7,7 +7,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclWinInit.c,v 1.40.2.5 2004/03/29 18:49:36 hobbs Exp $ + * RCS: @(#) $Id: tclWinInit.c,v 1.40.2.6 2005/10/23 22:01:31 msofer Exp $ */ #include "tclWinInt.h" @@ -847,7 +847,9 @@ Tcl_Init(interp) if (pathPtr == NULL) { pathPtr = Tcl_NewObj(); } + Tcl_IncrRefCount(pathPtr); Tcl_SetVar2Ex(interp, "tcl_libPath", NULL, pathPtr, TCL_GLOBAL_ONLY); + Tcl_DecrRefCount(pathPtr); return Tcl_Eval(interp, initScript); } |
