tty: Fix a kref leak in the HSO driver on re-open
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
a9fec7102f
commit
fe41cbb164
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue