diff options
| author | mig <mig> | 2012-12-13 13:37:19 (GMT) |
|---|---|---|
| committer | mig <mig> | 2012-12-13 13:37:19 (GMT) |
| commit | 451d04fef49607edcf24a2e2c23f0d105131ccf9 (patch) | |
| tree | 95c002e07c7e884c18be2eddb392ecb6023a2b63 | |
| parent | ca8ffd99e6f390c99f9434b558afd5f56cf2edb1 (diff) | |
| download | tcl-451d04fef49607edcf24a2e2c23f0d105131ccf9.zip tcl-451d04fef49607edcf24a2e2c23f0d105131ccf9.tar.gz tcl-451d04fef49607edcf24a2e2c23f0d105131ccf9.tar.bz2 | |
Fix for [Bug 3595576], found by andrewsh
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | generic/tclCmdAH.c | 3 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,10 @@ +2012-11-13 Miguel Sofer <msofer@users.sf.net> + + * generic/tclCmdAH.c (CatchObjCmdCallback): do not decrRefCount + the newValuePtr sent to Tcl_ObjSetVar2: TOSV2 is 'fire and + forget', it decrs on its own. Fix for [Bug 3595576], found by + andrewsh. + 2012-12-13 Jan Nijtmans <nijtmans@users.sf.net> * generic/tcl.h: Fix Tcl_DecrRefCount macro such that it diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 14951e4..133a61b 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -361,7 +361,8 @@ CatchObjCmdCallback( if (NULL == Tcl_ObjSetVar2(interp, optionVarNamePtr, NULL, options, TCL_LEAVE_ERR_MSG)) { - Tcl_DecrRefCount(options); + /* Do not decrRefCount 'options', it was already done by + * Tcl_ObjSetVar2 */ return TCL_ERROR; } } |
