summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-12-06 20:44:32 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-12-06 20:44:32 (GMT)
commitcd525c7bb12f0758dcb87189fdb884697806cef7 (patch)
tree389bff3588e81171a214f6a085d5cb7999c72058 /generic
parentbb1c5fe83355d454d63db62da5797204c6cec06e (diff)
downloadtcl-cd525c7bb12f0758dcb87189fdb884697806cef7.zip
tcl-cd525c7bb12f0758dcb87189fdb884697806cef7.tar.gz
tcl-cd525c7bb12f0758dcb87189fdb884697806cef7.tar.bz2
Plug memleak recently put into [package require].
Diffstat (limited to 'generic')
-rw-r--r--generic/tclPkg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index d3dd584..349bda8 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -432,6 +432,8 @@ PkgRequireCore(
* The version of the package sought is better than the
* currently selected version.
*/
+ ckfree(bestVersion);
+ bestVersion = NULL;
goto newbest;
}
} else {
@@ -460,6 +462,8 @@ PkgRequireCore(
* This stable version of the package sought is better
* than the currently selected stable version.
*/
+ ckfree(bestStableVersion);
+ bestStableVersion = NULL;
goto newstable;
}
} else {