summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2014-08-02 19:20:06 (GMT)
committerKevin B Kenny <kennykb@acm.org>2014-08-02 19:20:06 (GMT)
commit2cfb3e19d01d75ab35c7cfeff3ec37c23dd34a4f (patch)
tree0de29565ab1dc6214ca6ef8e49eae3e7ee11608f /generic/tclCmdIL.c
parent54aa5c1f2d5513d45d1361a3615125a4810cc1c0 (diff)
parent3260faadc49ded6ca1d4aab4db21b5232cc647ff (diff)
downloadtcl-2cfb3e19d01d75ab35c7cfeff3ec37c23dd34a4f.zip
tcl-2cfb3e19d01d75ab35c7cfeff3ec37c23dd34a4f.tar.gz
tcl-2cfb3e19d01d75ab35c7cfeff3ec37c23dd34a4f.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index db216e5..d723e4b 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -1287,6 +1287,7 @@ TclInfoFrame(
"eval", "eval", "eval", "precompiled", "source", "proc"
};
Proc *procPtr = framePtr->framePtr ? framePtr->framePtr->procPtr : NULL;
+ int needsFree = -1;
/*
* Pull the information and construct the dictionary to return, as list.
@@ -1360,6 +1361,9 @@ TclInfoFrame(
}
ADD_PAIR("cmd", TclGetSourceFromFrame(fPtr, 0, NULL));
+ if (fPtr->cmdObj && framePtr->cmdObj == NULL) {
+ needsFree = lc - 1;
+ }
TclStackFree(interp, fPtr);
break;
}
@@ -1447,7 +1451,11 @@ TclInfoFrame(
}
}
- return Tcl_NewListObj(lc, lv);
+ tmpObj = Tcl_NewListObj(lc, lv);
+ if (needsFree >= 0) {
+ Tcl_DecrRefCount(lv[needsFree]);
+ }
+ return tmpObj;
}
/*
@@ -2655,7 +2663,7 @@ Tcl_LrepeatObjCmd(
* number of times.
*/
- CLANG_ASSERT(dataArray);
+ CLANG_ASSERT(dataArray || totalElems == 0 );
if (objc == 1) {
register Tcl_Obj *tmpPtr = objv[0];