From 8ed6eacd06d6aa6f831c5c7f04e58e84d38a98ab Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sat, 29 Nov 2014 16:35:29 +0100 Subject: [PATCH] WPrefs: fix memory leaks on temporary colours to draw icon's title in Appearence preview (Coverity #72808, #72810) Two WMColor were created to draw the background for the title on icons for iconified windows, in the Appearance panel. As pointed by Coverity, these colors were not released after use, which this patch fixes. Signed-off-by: Christophe CURIS --- WPrefs.app/Appearance.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c index 25f14223..9e0e8a6a 100644 --- a/WPrefs.app/Appearance.c +++ b/WPrefs.app/Appearance.c @@ -1624,7 +1624,9 @@ static void updateColorPreviewBox(_Panel * panel, int elements) panel->smallFont, 155, 130, 64, 13, WALeft, _("Icon Text")); - } + WMReleaseColor(light); + WMReleaseColor(dim); + } if (elements & (1 << CLIP_COL) || elements & (1 << CCLIP_COL)) { Pixmap pix;