Skip to content

Commit

Permalink
Fix bug: mem leak
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <[email protected]>
  • Loading branch information
zhaojh329 committed Feb 10, 2020
1 parent 9d555c4 commit f03f2c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rtty.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ static void rtty_exit(struct rtty *rtty)
ev_io_stop(rtty->loop, &rtty->iow);
ev_io_stop(rtty->loop, &rtty->iof);

buffer_free(&rtty->rb);
buffer_free(&rtty->wb);

for (int i = 0; i < RTTY_MAX_TTY; i++)
if (rtty->ttys[i])
del_tty(rtty->ttys[i]);
Expand Down

0 comments on commit f03f2c6

Please sign in to comment.