diff options
author | das <das> | 2009-02-06 08:12:06 (GMT) |
---|---|---|
committer | das <das> | 2009-02-06 08:12:06 (GMT) |
commit | 76e883da5646c90946512d237df48377778d63cc (patch) | |
tree | 575c6e052e7d2d83bbdced2270820a4e834455eb /generic/tkUtil.c | |
parent | aa3ffc278895964cd47e3ef9e875eee6f8b7e71b (diff) | |
download | tk-76e883da5646c90946512d237df48377778d63cc.zip tk-76e883da5646c90946512d237df48377778d63cc.tar.gz tk-76e883da5646c90946512d237df48377778d63cc.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); |