diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2006-11-15 00:30:17 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-11-14 16:02:02 -0800 |
commit | c387fd85f84b9d89a75596325d8d6a0f730baf64 (patch) | |
tree | 3c161af64d908a29825a76acb556b7f4bd0dd4bf | |
parent | f5ad1a785f7fb9e6f65ba437ba0a64cad4e97dae (diff) | |
download | op-kernel-dev-c387fd85f84b9d89a75596325d8d6a0f730baf64.zip op-kernel-dev-c387fd85f84b9d89a75596325d8d6a0f730baf64.tar.gz |
[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>
-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 e9e9bf3..58c955e 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; |