Commit fe41cbb1 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

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

Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a9fec710
...@@ -1297,6 +1297,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp) ...@@ -1297,6 +1297,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
/* setup */ /* setup */
spin_lock_irq(&serial->serial_lock); spin_lock_irq(&serial->serial_lock);
tty->driver_data = serial; tty->driver_data = serial;
tty_kref_put(serial->tty);
serial->tty = tty_kref_get(tty); serial->tty = tty_kref_get(tty);
spin_unlock_irq(&serial->serial_lock); spin_unlock_irq(&serial->serial_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment