This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / usb / serial / omninet.c
index b5f2c06..a1cba4b 100644 (file)
@@ -178,6 +178,7 @@ static void omninet_close (struct usb_serial_port *port, struct file * filp)
 {
        struct usb_serial       *serial = port->serial;
        struct usb_serial_port  *wport;
+       struct omninet_data     *od;
 
        dbg("%s - port %d", __FUNCTION__, port->number);
 
@@ -185,7 +186,9 @@ static void omninet_close (struct usb_serial_port *port, struct file * filp)
        usb_kill_urb(wport->write_urb);
        usb_kill_urb(port->read_urb);
 
-       kfree(usb_get_serial_port_data(port));
+       od = usb_get_serial_port_data(port);
+       if (od)
+               kfree(od);
 }