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 | 337481bde00a01912f25ffeda6d5bd4351057c7d (patch) | |
tree | c2da79f4e5a542014dab31edea47e6bd46a22b4c /generic/tclCmdIL.c | |
parent | 352f9db6131a948693af4acd7d5ae471c54635c2 (diff) | |
download | tcl-337481bde00a01912f25ffeda6d5bd4351057c7d.zip tcl-337481bde00a01912f25ffeda6d5bd4351057c7d.tar.gz tcl-337481bde00a01912f25ffeda6d5bd4351057c7d.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 'generic/tclCmdIL.c')
-rw-r--r-- | generic/tclCmdIL.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index ab5c876..f38011b 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.47.2.6 2005/07/29 14:57:26 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.47.2.7 2005/10/23 22:01:29 msofer Exp $ */ #include "tclInt.h" @@ -933,10 +933,11 @@ InfoDefaultCmd(dummy, interp, objc, objv) Tcl_SetIntObj(Tcl_GetObjResult(interp), 1); } else { Tcl_Obj *nullObjPtr = Tcl_NewObj(); + Tcl_IncrRefCount(nullObjPtr); valueObjPtr = Tcl_ObjSetVar2(interp, objv[4], NULL, nullObjPtr, 0); + Tcl_DecrRefCount(nullObjPtr); /* free unneeded obj */ if (valueObjPtr == NULL) { - Tcl_DecrRefCount(nullObjPtr); /* free unneeded obj */ goto defStoreError; } Tcl_SetIntObj(Tcl_GetObjResult(interp), 0); |