diff options
author | dgp <dgp@users.sourceforge.net> | 2014-07-11 15:44:42 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-07-11 15:44:42 (GMT) |
commit | afe83cbf85df2fa657c86e95af1892a567643896 (patch) | |
tree | 16d545ca3bb0424b8498e634033c1f7482ed0618 | |
parent | 3088c8e046d26ebc9db26c8f3edffdf32cc327be (diff) | |
download | tcl-afe83cbf85df2fa657c86e95af1892a567643896.zip tcl-afe83cbf85df2fa657c86e95af1892a567643896.tar.gz tcl-afe83cbf85df2fa657c86e95af1892a567643896.tar.bz2 |
[9b352768e6] Plug memleak in INST_DICT_FIRST.
-rw-r--r-- | generic/tclExecute.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index d8c5935..2f9aac3 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -7474,6 +7474,14 @@ TEBCresume( searchPtr = ckalloc(sizeof(Tcl_DictSearch)); if (Tcl_DictObjFirst(interp, dictPtr, searchPtr, &keyPtr, &valuePtr, &done) != TCL_OK) { + + /* + * dictPtr is no longer on the stack, and we're not + * moving it into the intrep of an iterator. We need + * to drop the refcount [Tcl Bug 9b352768e6]. + */ + + Tcl_DecrRefCount(dictPtr); ckfree(searchPtr); TRACE_ERROR(interp); goto gotError; |