summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-07-14 15:17:58 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-07-14 15:17:58 (GMT)
commit35eb3535af4c4a03667bbf2b4fcde538d5e875fe (patch)
tree4be4eee6a3603d9e7d0ae8233213269f0a9ef2cc /generic/tclVar.c
parent18d118050e87e9f2665c7da4358836e37dbd7a0f (diff)
downloadtcl-35eb3535af4c4a03667bbf2b4fcde538d5e875fe.zip
tcl-35eb3535af4c4a03667bbf2b4fcde538d5e875fe.tar.gz
tcl-35eb3535af4c4a03667bbf2b4fcde538d5e875fe.tar.bz2
Plug memory leak created in recent variable Tcl_ObjType reform.
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r--generic/tclVar.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index a9bedd7..091baf8 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -577,11 +577,7 @@ TclObjLookupVarEx(
}
return NULL;
}
- if ((part2Ptr = part1Ptr->internalRep.twoPtrValue.ptr2)) {
- if (createPart2) {
- Tcl_IncrRefCount(part2Ptr);
- }
- }
+ part2Ptr = part1Ptr->internalRep.twoPtrValue.ptr2;
part1Ptr = part1Ptr->internalRep.twoPtrValue.ptr1;
typePtr = part1Ptr->typePtr;
if (typePtr == &localVarNameType) {
@@ -622,9 +618,6 @@ TclObjLookupVarEx(
len1 = i;
part2Ptr = Tcl_NewStringObj(part2, len2);
- if (createPart2) {
- Tcl_IncrRefCount(part2Ptr);
- }
/*
* Free the internal rep of the original part1Ptr, now renamed