Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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

parent a9fec710
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);