diff options
author | hobbs <hobbs> | 2000-01-26 03:37:40 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2000-01-26 03:37:40 (GMT) |
commit | 3eb5dfa1d24599dedc834f002282d654e757b552 (patch) | |
tree | bd7431bafb7dd513d0d3ef639da18cf478ec87e4 /generic/tclCmdIL.c | |
parent | 04bd0d9f87302a0c6dfcf3641cee54bc29c3f223 (diff) | |
download | tcl-3eb5dfa1d24599dedc834f002282d654e757b552.zip tcl-3eb5dfa1d24599dedc834f002282d654e757b552.tar.gz tcl-3eb5dfa1d24599dedc834f002282d654e757b552.tar.bz2 |
* generic/tclClock.c (FormatClock): inlined resultPtr, as it
conflicted with var creation for HAVE_TZSET #def [Bug: 4063]
* generic/tclCmdIL.c (Tcl_LsortObjCmd): fixed potential leak
when calling lsort -command with bad command [Bug: 4067]
* generic/tclFileName.c (Tcl_JoinPath): added support for special
QNX node id prefixes in pathnames [Bug: 4053]
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r-- | generic/tclCmdIL.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 4240f84..32567a9 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -14,7 +14,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.22 2000/01/21 02:25:26 hobbs Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.23 2000/01/26 03:37:40 hobbs Exp $ */ #include "tclInt.h" @@ -2600,14 +2600,18 @@ Tcl_LsortObjCmd(clientData, interp, objc, objv) */ Tcl_Obj *newCommandPtr = Tcl_DuplicateObj(cmdPtr); + Tcl_Obj *newObjPtr = Tcl_NewObj(); - if (Tcl_ListObjAppendElement(interp, newCommandPtr, Tcl_NewObj()) - != TCL_OK) { + Tcl_IncrRefCount(newCommandPtr); + if (Tcl_ListObjAppendElement(interp, newCommandPtr, newObjPtr) + != TCL_OK) { + Tcl_DecrRefCount(newCommandPtr); + Tcl_IncrRefCount(newObjPtr); + Tcl_DecrRefCount(newObjPtr); return TCL_ERROR; } Tcl_ListObjAppendElement(interp, newCommandPtr, Tcl_NewObj()); sortInfo.compareCmdPtr = newCommandPtr; - Tcl_IncrRefCount(newCommandPtr); } sortInfo.resultCode = Tcl_ListObjGetElements(interp, objv[objc-1], |