diff --git a/src/framewin.c b/src/framewin.c index 0ea9423..994f3af 100644 --- a/src/framewin.c +++ b/src/framewin.c @@ -400,9 +400,16 @@ void wFrameWindowUpdateBorders(WFrameWindow * fwin, int flags) checkTitleSize(fwin); - allocFrameBorderPixel(fwin->colormap, WMGetColorRGBDescription(scr->frame_border_color), &fwin->border_pixel); - allocFrameBorderPixel(fwin->colormap, WMGetColorRGBDescription(scr->frame_focused_border_color), &fwin->focused_border_pixel); - allocFrameBorderPixel(fwin->colormap, WMGetColorRGBDescription(scr->frame_selected_border_color), &fwin->selected_border_pixel); + char *desc; + desc = WMGetColorRGBDescription(scr->frame_border_color); + allocFrameBorderPixel(fwin->colormap, desc, &fwin->border_pixel); + wfree(desc); + desc = WMGetColorRGBDescription(scr->frame_focused_border_color); + allocFrameBorderPixel(fwin->colormap, desc, &fwin->focused_border_pixel); + wfree(desc); + desc = WMGetColorRGBDescription(scr->frame_selected_border_color); + allocFrameBorderPixel(fwin->colormap, desc, &fwin->selected_border_pixel); + wfree(desc); if (flags & WFF_SELECTED) { if (fwin->selected_border_pixel) diff --git a/src/wdefaults.c b/src/wdefaults.c index e725564..9e08220 100644 --- a/src/wdefaults.c +++ b/src/wdefaults.c @@ -467,6 +467,8 @@ RImage *get_default_image(WScreen *scr) if (!image) wwarning(_("could not find default icon \"%s\""), path); + wfree(path); + /* Resize the icon to the wPreferences.icon_size size * usually this function will return early, because size is right */ image = wIconValidateIconSize(image, wPreferences.icon_size); @@ -481,7 +483,10 @@ RImage *get_icon_image(WScreen *scr, const char *winstance, const char *wclass, /* Get the file name of the image, using instance and class */ file_name = get_icon_filename(winstance, wclass, NULL, True); - return get_rimage_from_file(scr, file_name, max_size); + RImage *image = get_rimage_from_file(scr, file_name, max_size); + if (file_name) + wfree(file_name); + return image; } int wDefaultGetStartWorkspace(WScreen *scr, const char *instance, const char *class)