diff options
author | das <das> | 2009-02-06 08:12:06 (GMT) |
---|---|---|
committer | das <das> | 2009-02-06 08:12:06 (GMT) |
commit | 327bb5e5b38a43360055bf1c02bcd38d33526973 (patch) | |
tree | 575c6e052e7d2d83bbdced2270820a4e834455eb /generic/tkUtil.c | |
parent | 51567b88ece4e730020fd53b4b200468c8a7b4c7 (diff) | |
download | tk-327bb5e5b38a43360055bf1c02bcd38d33526973.zip tk-327bb5e5b38a43360055bf1c02bcd38d33526973.tar.gz tk-327bb5e5b38a43360055bf1c02bcd38d33526973.tar.bz2 |
* generic/tkImgPhInstance.c: fix numerous leaks discovered with the
* generic/tkMenu.c: Mac OS X Instruments.app Leaks tool.
* generic/tkText.c:
* generic/tkTextImage.c:
* generic/tkTextIndex.c:
* generic/tkUndo.c:
* generic/tkUtil.c:
* generic/ttk/ttkFrame.c:
* macosx/tkMacOSXWm.c:
Diffstat (limited to 'generic/tkUtil.c')
-rw-r--r-- | generic/tkUtil.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tkUtil.c b/generic/tkUtil.c index 5218740..3c3b5f8 100644 --- a/generic/tkUtil.c +++ b/generic/tkUtil.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUtil.c,v 1.27 2008/12/10 05:02:51 das Exp $ + * RCS: @(#) $Id: tkUtil.c,v 1.28 2009/02/06 08:12:07 das Exp $ */ #include "tkInt.h" @@ -1084,7 +1084,7 @@ TkMakeEnsemble( { Tcl_Namespace *namespacePtr = NULL; Tcl_Command ensemble = NULL; - Tcl_Obj *dictObj = NULL; + Tcl_Obj *dictObj = NULL, *nameObj; Tcl_DString ds; int i; @@ -1102,7 +1102,9 @@ TkMakeEnsemble( } } - ensemble = Tcl_FindEnsemble(interp, Tcl_NewStringObj(name,-1), 0); + nameObj = Tcl_NewStringObj(name, -1); + ensemble = Tcl_FindEnsemble(interp, nameObj, 0); + Tcl_DecrRefCount(nameObj); if (ensemble == NULL) { ensemble = Tcl_CreateEnsemble(interp, name, namespacePtr, TCL_ENSEMBLE_PREFIX); |