summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdAH.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-02-04 06:45:30 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-02-04 06:45:30 (GMT)
commit9f62a7f8caeba94f637d1b67f2bdce5e18754dab (patch)
treeb4ed350201757c2b04007c6d68a57b65b4753318 /generic/tclCmdAH.c
parenta407d6905324de3de916c00cac8a979bf7fc52ec (diff)
downloadtcl-9f62a7f8caeba94f637d1b67f2bdce5e18754dab.zip
tcl-9f62a7f8caeba94f637d1b67f2bdce5e18754dab.tar.gz
tcl-9f62a7f8caeba94f637d1b67f2bdce5e18754dab.tar.bz2
* generic/tclCmdAH.c (StoreStateData): Removed improper refcount
decrement of the varName parameter. This error was causing segfaults following test cmdAH-28.7.
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r--generic/tclCmdAH.c6
1 files changed, 4 insertions, 2 deletions
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; \