From: Alan Cox Date: Thu, 15 Jan 2009 13:31:15 +0000 (+0000) Subject: tty: Fix a kref leak in the HSO driver on re-open X-Git-Tag: v2.6.29-rc2~70 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=fe41cbb164a0dc55f3914a0e4cabe8240410157c;p=linux-2.6-omap-h63xx.git tty: Fix a kref leak in the HSO driver on re-open Signed-off-by: Linus Torvalds --- diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index c4918b86ed1..9df04dd1332 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -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);