summaryrefslogtreecommitdiffstats
path: root/mac
diff options
context:
space:
mode:
authormsofer <msofer@noemail.net>2005-10-23 22:01:26 (GMT)
committermsofer <msofer@noemail.net>2005-10-23 22:01:26 (GMT)
commit948624ebed428bc0d1f86d477d4d284f12252a35 (patch)
treec2da79f4e5a542014dab31edea47e6bd46a22b4c /mac
parentdf4961a80660325037730842dfda4c1b6e37c43f (diff)
downloadtcl-948624ebed428bc0d1f86d477d4d284f12252a35.zip
tcl-948624ebed428bc0d1f86d477d4d284f12252a35.tar.gz
tcl-948624ebed428bc0d1f86d477d4d284f12252a35.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. FossilOrigin-Name: 8761ab798f625b66cadb3eaf8fafdedce6553a02
Diffstat (limited to 'mac')
-rw-r--r--mac/tclMacInit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mac/tclMacInit.c b/mac/tclMacInit.c
index a319713..afae114 100644
--- a/mac/tclMacInit.c
+++ b/mac/tclMacInit.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMacInit.c,v 1.9.2.1 2004/03/29 18:49:36 hobbs Exp $
+ * RCS: @(#) $Id: tclMacInit.c,v 1.9.2.2 2005/10/23 22:01:31 msofer Exp $
*/
#include <AppleEvents.h>
@@ -712,7 +712,9 @@ Tcl_Init(
if (pathPtr == NULL) {
pathPtr = Tcl_NewObj();
}
+ Tcl_IncrRefCount(pathPtr);
Tcl_SetVar2Ex(interp, "auto_path", NULL, pathPtr, TCL_GLOBAL_ONLY);
+ Tcl_DecrRefCount(pathPtr);
return Tcl_Eval(interp, initCmd);
}