[PATCH 1/2] Fix memory leak after freeing screen with path set

14 views
Skip to first unread message

Sergey Nizovtsev

unread,
Oct 30, 2020, 7:01:41 AM10/30/20
to tmux-...@googlegroups.com, Sergey Nizovtsev
diff --git screen.c screen.c
index 95299306..b55c9f87 100644
--- screen.c
+++ screen.c
@@ -78,6 +78,7 @@ screen_init(struct screen *s, u_int sx, u_int sy,
u_int hlimit)

s->title = xstrdup("");
s->titles = NULL;
+ s->path = NULL;

s->cstyle = 0;
s->ccolour = xstrdup("");
@@ -120,6 +121,7 @@ screen_free(struct screen *s)
{
free(s->sel);
free(s->tabs);
+ free(s->path);
free(s->title);
free(s->ccolour);

--
2.28.0
Reply all
Reply to author
Forward
0 new messages