summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhInstance.c
diff options
context:
space:
mode:
authordas <das>2009-02-06 08:12:06 (GMT)
committerdas <das>2009-02-06 08:12:06 (GMT)
commit76e883da5646c90946512d237df48377778d63cc (patch)
tree575c6e052e7d2d83bbdced2270820a4e834455eb /generic/tkImgPhInstance.c
parentaa3ffc278895964cd47e3ef9e875eee6f8b7e71b (diff)
downloadtk-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/tkImgPhInstance.c')
-rw-r--r--generic/tkImgPhInstance.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tkImgPhInstance.c b/generic/tkImgPhInstance.c
index 1b0395e..07fa0c0 100644
--- a/generic/tkImgPhInstance.c
+++ b/generic/tkImgPhInstance.c
@@ -17,7 +17,7 @@
* Department of Computer Science,
* Australian National University.
*
- * RCS: @(#) $Id: tkImgPhInstance.c,v 1.1 2008/08/25 11:44:04 dkf Exp $
+ * RCS: @(#) $Id: tkImgPhInstance.c,v 1.2 2009/02/06 08:12:07 das Exp $
*/
#include "tkImgPhoto.h"
@@ -350,6 +350,8 @@ TkImgPhotoGet(
WhitePixelOfScreen(Tk_Screen(tkwin));
gcValues.background = (black != NULL)? black->pixel:
BlackPixelOfScreen(Tk_Screen(tkwin));
+ Tk_FreeColor(white);
+ Tk_FreeColor(black);
gcValues.graphics_exposures = False;
instancePtr->gc = Tk_GetGC(tkwin,
GCForeground|GCBackground|GCGraphicsExposures, &gcValues);