提交 fe41cbb1 编写于 作者: A Alan Cox 提交者: Linus Torvalds

tty: Fix a kref leak in the HSO driver on re-open

Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a9fec710
......@@ -1297,6 +1297,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
/* setup */
spin_lock_irq(&serial->serial_lock);
tty->driver_data = serial;
tty_kref_put(serial->tty);
serial->tty = tty_kref_get(tty);
spin_unlock_irq(&serial->serial_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册