Introduction
Introduction Statistics Contact Development Disclaimer Help
drw.c: drw_scm_free: call free inside - dwm - dynamic window manager
git clone git://git.suckless.org/dwm
Log
Files
Refs
README
LICENSE
---
commit 7c3abae4e68b6a21f05cb04f3af31217259c0aa9
parent 93f26863d14666e56e992de3670a77178e66ddf2
Author: Hiltjo Posthuma <[email protected]>
Date: Mon, 29 Sep 2025 18:48:27 +0200
drw.c: drw_scm_free: call free inside
Because drw_scm_create() allocates it.
Diffstat:
M drw.c | 1 +
M dwm.c | 4 +---
2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/drw.c b/drw.c
@@ -215,6 +215,7 @@ drw_scm_free(Drw *drw, Clr *scm, size_t clrcount)
for (i = 0; i < clrcount; i++)
drw_clr_free(drw, &scm[i]);
+ free(scm);
}
void
diff --git a/dwm.c b/dwm.c
@@ -485,10 +485,8 @@ cleanup(void)
cleanupmon(mons);
for (i = 0; i < CurLast; i++)
drw_cur_free(drw, cursor[i]);
- for (i = 0; i < LENGTH(colors); i++) {
+ for (i = 0; i < LENGTH(colors); i++)
drw_scm_free(drw, scheme[i], 3);
- free(scheme[i]);
- }
free(scheme);
XDestroyWindow(dpy, wmcheckwin);
drw_free(drw);
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.