1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

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
This commit is contained in:
Michael Vetter 2020-02-27 16:14:54 +01:00
parent 16f5106f10
commit ca14f3a1a2

View File

@ -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;