summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2004-12-13 01:50:19 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2004-12-13 01:50:19 (GMT)
commit4bfb7f47a42094aae82121f240bad43669481e6b (patch)
tree8f64e19baf66bcc6630ce2685c91c794fbb5281d /generic
parent16f317ea1543e3ccc59306c6ecb398b165d30bc6 (diff)
downloadtcl-4bfb7f47a42094aae82121f240bad43669481e6b.zip
tcl-4bfb7f47a42094aae82121f240bad43669481e6b.tar.gz
tcl-4bfb7f47a42094aae82121f240bad43669481e6b.tar.bz2
* generic/tclVar.c (TclArrayObjCmd - ARRAY_NAMES): leaking an object [Bug
1084111] - thanks to Rolf Ade.
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;
}