diff options
author | hobbs <hobbs> | 2001-06-28 00:42:55 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-06-28 00:42:55 (GMT) |
commit | cd07ed00f9a1c746ef036cbb8a99e3332ae36b8e (patch) | |
tree | fb1b58339a6b329e7e8676ac5fe9649253f46c73 /generic/tclCmdIL.c | |
parent | 41fc16b285fe742f30c631d930d192989ca4f43a (diff) | |
download | tcl-cd07ed00f9a1c746ef036cbb8a99e3332ae36b8e.zip tcl-cd07ed00f9a1c746ef036cbb8a99e3332ae36b8e.tar.gz tcl-cd07ed00f9a1c746ef036cbb8a99e3332ae36b8e.tar.bz2 |
* generic/tclCmdIL.c (InfoProcsCmd): fixed potential mem leak in
info procs that created objects without using them.
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r-- | generic/tclCmdIL.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 833d8a3..3ba2a34 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.31 2001/05/30 08:57:06 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.32 2001/06/28 00:42:55 hobbs Exp $ */ #include "tclInt.h" @@ -1562,19 +1562,19 @@ InfoProcsCmd(dummy, interp, objc, objv) || Tcl_StringMatch(cmdName, simplePattern)) { cmdPtr = (Command *) Tcl_GetHashValue(entryPtr); - if (specificNsInPattern) { - elemObjPtr = Tcl_NewObj(); - Tcl_GetCommandFullName(interp, (Tcl_Command) cmdPtr, - elemObjPtr); - } else { - elemObjPtr = Tcl_NewStringObj(cmdName, -1); - } - realCmdPtr = (Command *) TclGetOriginalCommand((Tcl_Command) cmdPtr); if (TclIsProc(cmdPtr) || ((realCmdPtr != NULL) && TclIsProc(realCmdPtr))) { + if (specificNsInPattern) { + elemObjPtr = Tcl_NewObj(); + Tcl_GetCommandFullName(interp, (Tcl_Command) cmdPtr, + elemObjPtr); + } else { + elemObjPtr = Tcl_NewStringObj(cmdName, -1); + } + Tcl_ListObjAppendElement(interp, listPtr, elemObjPtr); } } |