diff options
author | hobbs <hobbs@noemail.net> | 2001-06-28 00:42:54 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2001-06-28 00:42:54 (GMT) |
commit | 8d7c736254b992b9e27980f02217da8f3762ab1a (patch) | |
tree | fb1b58339a6b329e7e8676ac5fe9649253f46c73 | |
parent | ed6305ced59de9c6ac02147dbc29a78adff9a9d6 (diff) | |
download | tcl-8d7c736254b992b9e27980f02217da8f3762ab1a.zip tcl-8d7c736254b992b9e27980f02217da8f3762ab1a.tar.gz tcl-8d7c736254b992b9e27980f02217da8f3762ab1a.tar.bz2 |
* generic/tclCmdIL.c (InfoProcsCmd): fixed potential mem leak in
info procs that created objects without using them.
FossilOrigin-Name: 55fb744f1f134d320bae32513e010884c78a8876
-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); } } |