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)
commit0d31e4cefc735abf4b5eb232c3b89effa9ebc3aa (patch)
treed6aee156688cbe239524349e78d8f2f79a79340a /generic
parent817534697915bca720f02388c1e9b6a0e72718c0 (diff)
downloadtcl-0d31e4cefc735abf4b5eb232c3b89effa9ebc3aa.zip
tcl-0d31e4cefc735abf4b5eb232c3b89effa9ebc3aa.tar.gz
tcl-0d31e4cefc735abf4b5eb232c3b89effa9ebc3aa.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 {