summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-02-17 20:55:32 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-02-17 20:55:32 (GMT)
commita09e7d11eb23fc3178525780675d000298e8ccff (patch)
tree20d2d6bd1016e43a6d6286a7e45f1e5d6e4ded6c
parent6a8f878ac9d38e985b0c75d96986ea6a2afbf375 (diff)
downloadtcl-a09e7d11eb23fc3178525780675d000298e8ccff.zip
tcl-a09e7d11eb23fc3178525780675d000298e8ccff.tar.gz
tcl-a09e7d11eb23fc3178525780675d000298e8ccff.tar.bz2
Fix for my bozo-ness. [Bug 898910]
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclCompCmds.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6698e2e..0dad0dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-17 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+
+ * generic/tclCompCmds.c (TclCompileSwitchCmd): Bozo mistake in
+ memory releasing order when in an error case. [Bug 898910]
+
2004-02-16 Jeff Hobbs <jeffh@ActiveState.com>
* generic/tclTrace.c (TclTraceExecutionObjCmd)
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 477c4fe..a368383 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompCmds.c,v 1.55 2004/01/20 15:40:37 dkf Exp $
+ * RCS: @(#) $Id: tclCompCmds.c,v 1.56 2004/02/17 20:55:33 dkf Exp $
*/
#include "tclInt.h"
@@ -3283,7 +3283,6 @@ TclCompileSwitchCmd(interp, parsePtr, envPtr)
code = TclCompileScript(interp, bodyTokenArray[i+1].start,
bodyTokenArray[i+1].size, envPtr);
if (code != TCL_OK) {
- ckfree((char *)argv);
ckfree((char *)bodyTokenArray);
ckfree((char *)fixupArray);
ckfree((char *)fixupTargetArray);
@@ -3297,6 +3296,7 @@ TclCompileSwitchCmd(interp, parsePtr, envPtr)
Tcl_AddObjErrorInfo(interp, errInfBuf, -1);
ckfree(errInfBuf);
}
+ ckfree((char *)argv);
return code;
}