From e1fea940e4c642b1c883429ed5f2a69d51b84270 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 18 Apr 2021 13:05:33 +0200 Subject: Fixed some memory leaks --- apps/wm/wm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'apps') 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; } -- cgit v1.2.3