Skip to content

Commit

Permalink
USB: fix omninet memory leak found by coverity
Browse files Browse the repository at this point in the history
the transfer of allocating the descriptor in attach and no longer in open
was incomplete resulting in a memory leak coverity spotted. This fix
is against the patch set you posted.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed May 23, 2007
1 parent ad9ddd6 commit 5ac43d1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/usb/serial/omninet.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,10 @@ static int omninet_open (struct usb_serial_port *port, struct file *filp)
{
struct usb_serial *serial = port->serial;
struct usb_serial_port *wport;
struct omninet_data *od = usb_get_serial_port_data(port);
int result = 0;

dbg("%s - port %d", __FUNCTION__, port->number);

od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
wport = serial->port[1];
wport->tty = port->tty;

Expand Down

0 comments on commit 5ac43d1

Please sign in to comment.