USB: kl5usb105: fix memory leak
authorJohan Hovold <jhovold@gmail.com>
Tue, 18 May 2010 22:01:38 +0000 (00:01 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 May 2010 20:21:50 +0000 (13:21 -0700)
Private data was not freed on error path in startup.

Cc: stable <stable@kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/kl5kusb105.c

index 8eef91ba4b1c5021c2ecad2725e028ad4ce7dd73..cc0ba38d47482424738c73b470a4c61aedb75ed2 100644 (file)
@@ -321,6 +321,7 @@ err_cleanup:
                                usb_free_urb(priv->write_urb_pool[j]);
                        }
                }
+               kfree(priv);
                usb_set_serial_port_data(serial->port[i], NULL);
        }
        return -ENOMEM;