summaryrefslogtreecommitdiffstats
path: root/generic/tclDictObj.c
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2009-10-08 14:37:36 (GMT)
committerdkf <dkf@noemail.net>2009-10-08 14:37:36 (GMT)
commit7f34489212129a8bd4cf73c8ea09e1a59597fd3b (patch)
tree0e19ed6fc085b82d76297784349b278f616bb5d3 /generic/tclDictObj.c
parente364f7f7fb5fbbf3765c58a6a2f4e934a9d1aabe (diff)
downloadtcl-7f34489212129a8bd4cf73c8ea09e1a59597fd3b.zip
tcl-7f34489212129a8bd4cf73c8ea09e1a59597fd3b.tar.gz
tcl-7f34489212129a8bd4cf73c8ea09e1a59597fd3b.tar.bz2
[Bug 2874678]: Don't leak bignums in [dict incr]...
FossilOrigin-Name: fa32677770142bc1cd3f95cdb6f24735109131f8
Diffstat (limited to 'generic/tclDictObj.c')
-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 {