diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-08-20 14:29:13 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-08-20 14:29:13 (GMT) |
commit | 448e644c7e3981261214ecddd21923534377a6f2 (patch) | |
tree | 038556cfb30d8e691ca7babc928ca8671c0d9b14 | |
parent | 9e2afa863774403642eba857799a3b5eee58e623 (diff) | |
download | tcl-448e644c7e3981261214ecddd21923534377a6f2.zip tcl-448e644c7e3981261214ecddd21923534377a6f2.tar.gz tcl-448e644c7e3981261214ecddd21923534377a6f2.tar.bz2 |
Backport of memory leak plug.
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | generic/tclCmdIL.c | 5 |
2 files changed, 14 insertions, 8 deletions
@@ -1,16 +1,19 @@ +2009-08-20 Donal K. Fellows <dkf@users.sf.net> + + * generic/tclCmdIL.c (Tcl_LsortObjCmd): Plug memory leak. + 2009-08-18 Don Porter <dgp@users.sourceforge.net> - * generic/tclPathObj.c: Added NULL check to prevent crashes during - * tests/fileName.test: [glob]. [Bug 2837800] + * generic/tclPathObj.c: [Bug 2837800]: Added NULL check to prevent + * tests/fileName.test: crashes during [glob]. 2009-08-06 Andreas Kupries <andreask@activestate.com> * doc/refchan.n [Bug 2827000]: Extended the implementation of - * generic/tclIORChan.c: reflective channels (TIP 219, method - * tests/ioCmd.test: 'read'), enabling handlers to signal EAGAIN to - indicate 'no data, but not at EOF either', and other system - errors. Updated documentation, extended testsuite (New test cases - iocmd*-23.{9,10}). + * generic/tclIORChan.c: reflective channels (TIP 219, method 'read'), + * tests/ioCmd.test: enabling handlers to signal EAGAIN to indicate 'no + data, but not at EOF either', and other system errors. Updated + documentation, extended testsuite (New test cases iocmd*-23.{9,10}). 2009-08-02 Donal K. Fellows <dkf@users.sf.net> diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index e485347..fed7975 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.137.2.7 2009/07/16 20:50:54 dgp Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.137.2.8 2009/08/20 14:29:14 dkf Exp $ */ #include "tclInt.h" @@ -3501,6 +3501,9 @@ Tcl_LsortObjCmd( for (i = 1; i < objc-1; i++) { if (Tcl_GetIndexFromObj(interp, objv[i], switches, "option", 0, &index) != TCL_OK) { + if (sortInfo.indexc > 1) { + ckfree((char *) sortInfo.indexv); + } return TCL_ERROR; } switch ((enum Lsort_Switches) index) { |