1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 18:45:10 +00:00

fix a few memleaks

This commit is contained in:
Phil Sutter 2009-06-22 01:50:15 +02:00
parent 867a842b3f
commit 775d591a68
2 changed files with 4 additions and 1 deletions

View File

@ -7416,7 +7416,6 @@ static void clean_up(void)
XFlush(display);
}
XFreeGC(display, window.gc);
free_fonts();
}
@ -7650,6 +7649,8 @@ static void set_default_configurations(void)
#endif /* X11 */
for (i = 0; i < MAX_TEMPLATES; i++) {
if (template[i])
free(template[i]);
template[i] = strdup("");
}
@ -8907,6 +8908,7 @@ int main(int argc, char **argv)
g_signal_pending = 0;
memset(&info, 0, sizeof(info));
memset(template, 0, sizeof(template));
clear_net_stats();
#ifdef TCP_PORT_MONITOR

View File

@ -216,6 +216,7 @@ void set_transparent_background(Window win)
void destroy_window(void)
{
XDestroyWindow(display, window.window);
XFreeGC(display, window.gc);
memset(&window, 0, sizeof(struct conky_window));
}