From ca14f3a1a2da4ecb7dc0293b73585798c7699200 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 27 Feb 2020 16:14:54 +0100 Subject: Fix memory leak in win_create_muc() I suspect this was just a copy paste error. `_win_create_simple_layout()` is called in other creation functions like `win_create_config()` or `win_create_private()`. I suspect when `win_create_muc()` was created it was just copied. But in this function we actually set the layout ourself later. So calling the function isn't needed. Regards https://github.com/profanity-im/profanity/issues/1279 --- src/ui/window.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/ui/window.c') diff --git a/src/ui/window.c b/src/ui/window.c index b9c7ca36..a93322e3 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -167,7 +167,6 @@ win_create_muc(const char *const roomjid) int cols = getmaxx(stdscr); new_win->window.type = WIN_MUC; - new_win->window.layout = _win_create_simple_layout(); ProfLayoutSplit *layout = malloc(sizeof(ProfLayoutSplit)); layout->base.type = LAYOUT_SPLIT; -- cgit 1.4.1-2-gfad0