summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-10-08 14:42:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-10-08 14:42:40 (GMT)
commitc13ed6590a2617f3a9941dcf9549541d30ec9512 (patch)
treed6aee156688cbe239524349e78d8f2f79a79340a /generic
parent20345c3ab020b4545c0b738cec8d7fad14039920 (diff)
downloadtcl-c13ed6590a2617f3a9941dcf9549541d30ec9512.zip
tcl-c13ed6590a2617f3a9941dcf9549541d30ec9512.tar.gz
tcl-c13ed6590a2617f3a9941dcf9549541d30ec9512.tar.bz2
[Bug 2874678]: Don't leak bignums in [dict incr]...
Diffstat (limited to 'generic')
-rw-r--r--generic/tclDictObj.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index fc1cac1..d66a9b7 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclDictObj.c,v 1.56.2.2 2009/01/06 16:07:17 dkf Exp $
+ * RCS: @(#) $Id: tclDictObj.c,v 1.56.2.3 2009/10/08 14:42:40 dkf Exp $
*/
#include "tclInt.h"
@@ -2151,6 +2151,12 @@ DictIncrCmd(
if (code != TCL_OK) {
Tcl_AddErrorInfo(interp, "\n (reading increment)");
} else {
+ /*
+ * Remember to dispose with the bignum as we're not actually
+ * using it directly. [Bug 2874678]
+ */
+
+ mp_clear(&increment);
Tcl_DictObjPut(interp, dictPtr, objv[2], objv[3]);
}
} else {