summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclVar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index daf05a9..ff0abce 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.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: tclVar.c,v 1.99 2004/11/12 19:16:53 dgp Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.100 2004/12/13 01:50:20 msofer Exp $
*/
#include "tclInt.h"
@@ -2954,6 +2954,7 @@ Tcl_ArrayObjCmd(dummy, interp, objc, objv)
namePtr = Tcl_NewStringObj(name, -1);
result = Tcl_ListObjAppendElement(interp, resultPtr, namePtr);
if (result != TCL_OK) {
+ Tcl_DecrRefCount(resultPtr);
Tcl_DecrRefCount(namePtr); /* free unneeded name obj */
return result;
}