aboutsummaryrefslogtreecommitdiff
path: root/apps/wm
diff options
context:
space:
mode:
authorMarvin Borner2021-04-18 13:05:33 +0200
committerMarvin Borner2021-04-18 13:05:33 +0200
commite1fea940e4c642b1c883429ed5f2a69d51b84270 (patch)
tree79884ba0ccdb9575553f4fb75e176cea31bb9cd6 /apps/wm
parentcdf029471736f43776452930b7195a06ab143654 (diff)
Fixed some memory leaks
Diffstat (limited to 'apps/wm')
-rw-r--r--apps/wm/wm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/wm/wm.c b/apps/wm/wm.c
index 8f3b21f..00dedd0 100644
--- a/apps/wm/wm.c
+++ b/apps/wm/wm.c
@@ -462,6 +462,7 @@ static void handle_message(void *msg)
static void handle_exit(void)
{
+ log("Handle\n");
if (keymap)
free(keymap);
@@ -472,10 +473,8 @@ static void handle_exit(void)
struct node *iterator = windows->head;
while (iterator) {
struct window *win = iterator->data;
- if (win->ctx.fb == screen.fb)
+ if (win->ctx.fb)
sys_free(win->ctx.fb);
- else if (win->ctx.fb)
- free(win->ctx.fb);
free(win);
iterator = iterator->next;
}