Fix bug: mem leak

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
This commit is contained in:
Jianhui Zhao
2020-02-10 21:43:57 +08:00
parent 9d555c4545
commit f03f2c69ce
+3
View File
@@ -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]);