From f958d7ae6277ff54eb419844904bdde05383b732 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 16 Mar 2009 10:21:42 +0000 Subject: Fix [Bug 2688063] --- ChangeLog | 5 +++++ generic/tclCmdMZ.c | 61 ++++++++++++++++++++++++++++++------------------------ 2 files changed, 39 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57e55d4..a693a81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-03-16 Donal K. Fellows + + * generic/tclCmdMZ.c (TryPostBody): [Bug 2688063]: Extract information + from list before getting rid of last reference to it. + 2009-03-15 Joe Mistachkin * generic/tclThread.c: Modify fix for TSD leak to match Tcl 8.5 diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index dbff659..296271c 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.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: tclCmdMZ.c,v 1.181 2009/03/09 09:12:39 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.182 2009/03/16 10:21:42 dkf Exp $ */ #include "tclInt.h" @@ -4097,7 +4097,7 @@ TclNRTryObjCmd( haveHandlers = 0; for (i=2 ; icmdFramePtr, -1); handlerFailed: options = During(interp, result, options, NULL); break; + + didNotMatch: + continue; } /* @@ -4447,12 +4455,12 @@ TryPostHandler( Tcl_Interp *interp, int result) { - Tcl_Obj *resultObj, *cmdObj, *options, *handlerObj; + Tcl_Obj *resultObj, *cmdObj, *options, *handlerKindObj; Tcl_Obj *finallyObj; cmdObj = data[0]; options = data[1]; - handlerObj = data[2]; + handlerKindObj = data[2]; finallyObj = data[3]; /* @@ -4464,14 +4472,13 @@ TryPostHandler( if (result == TCL_ERROR) { options = During(interp, result, options, Tcl_ObjPrintf( "\n (\"%s ... %s\" handler line %d)", - TclGetString(cmdObj), TclGetString(handlerObj), + TclGetString(cmdObj), TclGetString(handlerKindObj), Tcl_GetErrorLine(interp))); } else { Tcl_DecrRefCount(options); options = Tcl_GetReturnOptions(interp, result); Tcl_IncrRefCount(options); } - Tcl_DecrRefCount(handlerObj); /* * Process the finally clause if it is present. -- cgit v0.12