summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhoto.c
diff options
context:
space:
mode:
authordas <das>2009-02-06 08:13:23 (GMT)
committerdas <das>2009-02-06 08:13:23 (GMT)
commit15a787b4fd8d5503b075058f4e2ee096eb8d1924 (patch)
tree44f593df44065d8dcb637789eb6a8916b17c1726 /generic/tkImgPhoto.c
parent86073d3f1d918d1867733cd3eca92d32e88edb12 (diff)
downloadtk-15a787b4fd8d5503b075058f4e2ee096eb8d1924.zip
tk-15a787b4fd8d5503b075058f4e2ee096eb8d1924.tar.gz
tk-15a787b4fd8d5503b075058f4e2ee096eb8d1924.tar.bz2
* generic/tkImgPhoto.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/ttk/ttkFrame.c: * macosx/tkMacOSXWm.c:
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r--generic/tkImgPhoto.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 6d5bfec..9ffbb3d 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -17,7 +17,7 @@
* Department of Computer Science,
* Australian National University.
*
- * RCS: @(#) $Id: tkImgPhoto.c,v 1.76.2.2 2009/01/14 22:59:02 nijtmans Exp $
+ * RCS: @(#) $Id: tkImgPhoto.c,v 1.76.2.3 2009/02/06 08:13:23 das Exp $
*/
#include "tkInt.h"
@@ -2466,6 +2466,8 @@ ImgPhotoGet(
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);