summaryrefslogtreecommitdiffstats
path: root/generic/tclParse.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-07-24 16:56:59 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-07-24 16:56:59 (GMT)
commit0eb24b976438cfedbe287ccb3e41155a62785c1d (patch)
treea603d8e7dde86e04737b1a2353218ef36188adf4 /generic/tclParse.c
parentf9e25fe5e7e67249f73b8f5926b3b5549c0e212e (diff)
parent7682f9c4cd7dfb3439a27d03b4531358798ff443 (diff)
downloadtcl-0eb24b976438cfedbe287ccb3e41155a62785c1d.zip
tcl-0eb24b976438cfedbe287ccb3e41155a62785c1d.tar.gz
tcl-0eb24b976438cfedbe287ccb3e41155a62785c1d.tar.bz2
Demonstrate and fix memory leak in Tcl_ParseVar().
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r--generic/tclParse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 08615a7..6723d39 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -1567,6 +1567,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;