Addressing various memory leak issues ref. https://github.com/bakkeby/patches/issues/30

This commit is contained in:
bakkeby 2021-04-28 13:35:22 +02:00
parent 4bfda0327c
commit 77c45afe48
2 changed files with 7 additions and 0 deletions

5
dwm.c
View File

@ -1183,6 +1183,8 @@ cleanup(void)
cleanupmon(mons);
#if BAR_SYSTRAY_PATCH
if (showsystray && systray) {
while (systray->icons)
removesystrayicon(systray->icons);
if (systray->win) {
XUnmapWindow(dpy, systray->win);
XDestroyWindow(dpy, systray->win);
@ -1241,6 +1243,9 @@ cleanupmon(Monitor *mon)
XUnmapWindow(dpy, mon->tabwin);
XDestroyWindow(dpy, mon->tabwin);
#endif // TAB_PATCH
#if PERTAG_PATCH
free(mon->pertag);
#endif // PERTAG_PATCH
free(mon);
}

View File

@ -101,6 +101,8 @@ loadxrdb()
XRDB_LOAD_COLOR("color14", termcol14);
XRDB_LOAD_COLOR("color15", termcol15);
#endif // BAR_STATUS2D_XRDB_TERMCOLORS_PATCH
XrmDestroyDatabase(xrdb);
}
}
}