User: | Jiri Slaby |
Error type: | Resource Leak |
Error type description: | The code omits to put the resource to the system for reuse |
File location: | drivers/char/isicom.c |
Line in file: | 981 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2011-11-07 22:40:13 UTC |
951 952/* card->lock HAS to be held */ 953static void isicom_shutdown_port(struct isi_port *port) 954{ 955 struct isi_board *card = port->card; 956 struct tty_struct *tty; 957 958 tty = tty_port_tty_get(&port->port); 959 960 if (!(port->port.flags & ASYNC_INITIALIZED)) { 961 tty_kref_put(tty); 962 return; 963 } 964 965 tty_port_free_xmit_buf(&port->port); 966 port->port.flags &= ~ASYNC_INITIALIZED; 967 /* 3rd October 2000 : Vinayak P Risbud */ 968 tty_port_tty_set(&port->port, NULL); 969 970 /*Fix done by Anil .S on 30-04-2001 971 remote login through isi port has dtr toggle problem 972 due to which the carrier drops before the password prompt 973 appears on the remote end. Now we drop the dtr only if the 974 HUPCL(Hangup on close) flag is set for the tty*/ 975 976 if (C_HUPCL(tty)) 977 /* drop dtr on this port */ 978 drop_dtr(port); 979 980 /* any other port uninits */ 981 if (tty) 982 set_bit(TTY_IO_ERROR, &tty->flags); 983 984 if (--card->count < 0) { 985 pr_dbg("isicom_shutdown_port: bad board(0x%lx) count %d.\n", 986 card->base, card->count); 987 card->count = 0; 988 } 989 990 /* last port was closed, shutdown that boad too */ 991 if (C_HUPCL(tty)) {