From f27a5f8af9fc5a16b80a7d6646e44d718b0efd7d Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 9 Jan 2021 22:29:05 +0100 Subject: Finding memory leaks is SO exhausting argh --- libgui/gui.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libgui/gui.c') diff --git a/libgui/gui.c b/libgui/gui.c index afbc3ba..b675586 100644 --- a/libgui/gui.c +++ b/libgui/gui.c @@ -465,6 +465,7 @@ struct element *gui_add_text_input(struct element *container, int x, int y, u32 ((struct element_text_input *)text_input->data)->x = x; ((struct element_text_input *)text_input->data)->y = y; ((struct element_text_input *)text_input->data)->width = width; + ((struct element_text_input *)text_input->data)->text[0] = '\0'; ((struct element_text_input *)text_input->data)->color_fg = color_fg; ((struct element_text_input *)text_input->data)->color_bg = color_bg; ((struct element_text_input *)text_input->data)->font_type = font_type; @@ -590,6 +591,7 @@ void gui_event_loop(struct element *container) break; } } + free(msg); } -- cgit v1.2.3