summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-07-24 16:51:04 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-07-24 16:51:04 (GMT)
commit7682f9c4cd7dfb3439a27d03b4531358798ff443 (patch)
tree3013ac88f88e9887ce2d74db6f4a50cfae8dde80 /generic
parentc81da08d4a5ddf07bf70bab9be966473b2520644 (diff)
downloadtcl-7682f9c4cd7dfb3439a27d03b4531358798ff443.zip
tcl-7682f9c4cd7dfb3439a27d03b4531358798ff443.tar.gz
tcl-7682f9c4cd7dfb3439a27d03b4531358798ff443.tar.bz2
Demonstrate and fix memory leak in Tcl_ParseVar().
Diffstat (limited to 'generic')
-rw-r--r--generic/tclParse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 96c2a10..e475fb8 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -1566,6 +1566,7 @@ Tcl_ParseVar(
code = TclSubstTokens(interp, parsePtr->tokenPtr, parsePtr->numTokens,
NULL, 1, NULL, NULL);
+ Tcl_FreeParse(parsePtr);
TclStackFree(interp, parsePtr);
if (code != TCL_OK) {
return NULL;