diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2006-11-15 00:59:11 +0000 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2006-11-18 19:28:05 -0800 |
commit | ad9c08315e696506734a33c9f0324b5d9858ec6e (patch) | |
tree | e5087560addf5f16a9980a19c31abf15fa5e4d56 /drivers | |
parent | 6d7e0615152b01b5bd1dd8c9aea5d949e50fed93 (diff) |
[PATCH] Char: isicom, fix close bug
port is dereferenced even if it is NULL. Dereference it _after_ the
check if (!port)... Thanks Eric <ef87@yahoo.com> for reporting this.
This fixes
http://bugzilla.kernel.org/show_bug.cgi?id=7527
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/isicom.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 913be23e0a24..d4f6361a1616 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -1062,11 +1062,12 @@ static void isicom_shutdown_port(struct isi_port *port) static void isicom_close(struct tty_struct *tty, struct file *filp) { struct isi_port *port = tty->driver_data; - struct isi_board *card = port->card; + struct isi_board *card; unsigned long flags; if (!port) return; + card = port->card; if (isicom_paranoia_check(port, tty->name, "isicom_close")) return; |