summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 2112d6f..702bdca 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.118 2007/06/20 18:46:07 dgp Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.119 2007/06/22 20:42:23 dgp Exp $
*/
#include "tclInt.h"
@@ -4026,7 +4026,9 @@ Tcl_LsortObjCmd(
if (sortInfo.resultCode != TCL_OK || length <= 0) {
goto done;
}
- elementArray = (SortElement *) ckalloc(length * sizeof(SortElement));
+
+ elementArray = (SortElement *)
+ TclStackAlloc(interp, length * sizeof(SortElement));
for (i=0; i < length; i++){
elementArray[i].objPtr = listObjPtrs[i];
elementArray[i].count = 0;
@@ -4064,7 +4066,7 @@ Tcl_LsortObjCmd(
}
Tcl_SetObjResult(interp, resultPtr);
}
- ckfree((char *) elementArray);
+ TclStackFree(interp, elementArray);
done:
if (sortInfo.sortMode == SORTMODE_COMMAND) {