about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-02-27 16:14:54 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-02-27 16:14:54 +0100
commitca14f3a1a2da4ecb7dc0293b73585798c7699200 (patch)
tree45ea57fd68dd9a88dd3483e4d1be915714e01e8e /src
parent16f5106f10e434779186c63b94d82d1ebb14d21f (diff)
downloadprofani-tty-ca14f3a1a2da4ecb7dc0293b73585798c7699200.tar.gz
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
Diffstat (limited to 'src')
-rw-r--r--src/ui/window.c1
1 files changed, 0 insertions, 1 deletions
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;