summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-02-21 12:48:49 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-02-21 12:48:49 (GMT)
commit17485c720f551fd753dbaa2f744bc5ad46abb444 (patch)
tree4634e97b2dabba46adf371e932361f872a21ba31
parent4839bd41c090e36048ca739de2c1c0ca6347670c (diff)
downloadtcl-17485c720f551fd753dbaa2f744bc5ad46abb444.zip
tcl-17485c720f551fd753dbaa2f744bc5ad46abb444.tar.gz
tcl-17485c720f551fd753dbaa2f744bc5ad46abb444.tar.bz2
Fix memory leak on error path
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclLoad.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f36c249..712fd3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-21 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+
+ * generic/tclLoad.c (Tcl_LoadObjCmd): Fixed memory leak due to
+ an improper error exit route.
+
2004-02-20 David Gravereaux <davygrvy@pobox.com>
* win/tclWinSock.c (SocketThreadExitHandler): Don't call
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index 6773ac4..2227e6e 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclLoad.c,v 1.9 2003/02/01 23:37:29 kennykb Exp $
+ * RCS: @(#) $Id: tclLoad.c,v 1.10 2004/02/21 12:48:50 dkf Exp $
*/
#include "tclInt.h"
@@ -168,7 +168,8 @@ Tcl_LoadObjCmd(dummy, interp, objc, objv)
slaveIntName = Tcl_GetString(objv[3]);
target = Tcl_GetSlave(interp, slaveIntName);
if (target == NULL) {
- return TCL_ERROR;
+ code = TCL_ERROR;
+ goto done;
}
}