From: Oliver Neukum Date: Wed, 2 May 2007 08:33:10 +0000 (+0200) Subject: USB: fix omninet memory leak found by coverity X-Git-Tag: v2.6.22-rc3~91^2~28 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ac43d1fbbfd1b89f83c1a907c58d558d262e441;p=pandora-kernel.git USB: fix omninet memory leak found by coverity 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c index 4adfab988e86..00afc1712c39 100644 --- a/drivers/usb/serial/omninet.c +++ b/drivers/usb/serial/omninet.c @@ -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;