1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

Fix all memleaks that are clearly visible,

the default config should now run without memleaks, valgrind will
still report memleaks caused by the own_window-lines and the xft-lines
(in some cases) but those are caused by code that's not part of conky
This commit is contained in:
Nikolas Garofil 2009-07-15 16:33:18 +02:00
parent 4addf71241
commit 4c241bbf16
2 changed files with 7 additions and 1 deletions

View File

@ -52,6 +52,7 @@ void setup_fonts(void)
if (use_xft) {
if (window.xftdraw) {
XftDrawDestroy(window.xftdraw);
window.xftdraw = 0;
}
window.xftdraw = XftDrawCreate(display, window.drawable,
DefaultVisual(display, screen), DefaultColormap(display, screen));

View File

@ -194,7 +194,12 @@ void set_transparent_background(Window win)
void destroy_window(void)
{
if(window.xftdraw) {
XftDrawDestroy(window.xftdraw);
}
if(window.gc) {
XFreeGC(display, window.gc);
}
memset(&window, 0, sizeof(struct conky_window));
}