summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-10-08 14:37:36 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-10-08 14:37:36 (GMT)
commit96e6cf13bf6f34d470255420538843d45d04aed9 (patch)
tree0e19ed6fc085b82d76297784349b278f616bb5d3 /generic
parent4b5432b3e850af2f49c5d0d58d48a3736dcf0012 (diff)
downloadtcl-96e6cf13bf6f34d470255420538843d45d04aed9.zip
tcl-96e6cf13bf6f34d470255420538843d45d04aed9.tar.gz
tcl-96e6cf13bf6f34d470255420538843d45d04aed9.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 d30a769..32a5cb0 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.78 2009/09/30 03:11:24 dgp Exp $
+ * RCS: @(#) $Id: tclDictObj.c,v 1.79 2009/10/08 14:37:36 dkf Exp $
*/
#include "tclInt.h"
@@ -2165,6 +2165,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 {