summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2021-04-28 13:35:22 +0200
committerbakkeby <[email protected]>2021-04-28 13:35:22 +0200
commit77c45afe4860b2792b680f7dc1f6830fce6de2c8 (patch)
tree8a70cc618d7ead9453ac0c9128e7585899cb2832
parent4bfda0327c1696808db85475e24c898aa3af234e (diff)
downloaddwm-flexipatch-77c45afe4860b2792b680f7dc1f6830fce6de2c8.tar.gz
dwm-flexipatch-77c45afe4860b2792b680f7dc1f6830fce6de2c8.zip
Addressing various memory leak issues ref. https://github.com/bakkeby/patches/issues/30
-rw-r--r--dwm.c5
-rw-r--r--patch/xrdb.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/dwm.c b/dwm.c
index 78476dc..f4ec7ca 100644
--- a/dwm.c
+++ b/dwm.c
@@ -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);
}
diff --git a/patch/xrdb.c b/patch/xrdb.c
index e8633cd..cc6c73c 100644
--- a/patch/xrdb.c
+++ b/patch/xrdb.c
@@ -101,6 +101,8 @@ loadxrdb()
XRDB_LOAD_COLOR("color14", termcol14);
XRDB_LOAD_COLOR("color15", termcol15);
#endif // BAR_STATUS2D_XRDB_TERMCOLORS_PATCH
+
+ XrmDestroyDatabase(xrdb);
}
}
}