tty: Fix a kref leak in the HSO driver on re-open
authorAlan Cox <alan@redhat.com>
Thu, 15 Jan 2009 13:31:15 +0000 (13:31 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Jan 2009 20:48:36 +0000 (12:48 -0800)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/net/usb/hso.c

index c4918b86ed193cb4647510b950e114d952a627fd..9df04dd1332cf9b16b0d5998a1b03fb4083d6dc0 100644 (file)
@@ -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);