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 | 431189b805c68785e4237217c47b1dd10a87b7f5 (patch) | |
| tree | 16d545ca3bb0424b8498e634033c1f7482ed0618 | |
| parent | 4822b65c03cbbe8f8d2fe3da5f39ffcdd06bea82 (diff) | |
| download | tcl-431189b805c68785e4237217c47b1dd10a87b7f5.zip tcl-431189b805c68785e4237217c47b1dd10a87b7f5.tar.gz tcl-431189b805c68785e4237217c47b1dd10a87b7f5.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; |
