From 9f62a7f8caeba94f637d1b67f2bdce5e18754dab Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 4 Feb 2004 06:45:30 +0000 Subject: * generic/tclCmdAH.c (StoreStateData): Removed improper refcount decrement of the varName parameter. This error was causing segfaults following test cmdAH-28.7. --- ChangeLog | 4 ++++ generic/tclCmdAH.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f6cd524..aed628f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2004-02-04 Don Porter + * generic/tclCmdAH.c (StoreStateData): Removed improper refcount + decrement of the varName parameter. This error was causing + segfaults following test cmdAH-28.7. + * library/tcltest/tcltest.tcl: Corrected references to non-existent $name variable in [cleanupTests]. [Bug 833637] diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index c679195..287d139 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.40 2004/01/21 19:59:33 vincentdarley Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.41 2004/02/04 06:45:30 dgp Exp $ */ #include "tclInt.h" @@ -1568,12 +1568,14 @@ StoreStatData(interp, varName, statPtr) /* * Assume Tcl_ObjSetVar2() does not keep a copy of the field name! + * + * Might be a better idea to call Tcl_SetVar2Ex() instead so we + * don't have to make assumptions that might go wrong later. */ #define STORE_ARY(fieldName, object) \ Tcl_SetStringObj(field, (fieldName), -1); \ value = (object); \ if (Tcl_ObjSetVar2(interp,varName,field,value,TCL_LEAVE_ERR_MSG) == NULL) { \ - Tcl_DecrRefCount(varName); \ Tcl_DecrRefCount(field); \ Tcl_DecrRefCount(value); \ return TCL_ERROR; \ -- cgit v0.12