From: Kulikov Vasiliy Date: Mon, 12 Jul 2010 14:48:46 +0000 (+0400) Subject: staging: usbip: fix memory leak X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=47c7157f3406e83648dad1c5c4e6e8c0f574dfc3;p=linux-beck.git staging: usbip: fix memory leak sdev should be freed if stub_add_files() failed. Signed-off-by: Kulikov Vasiliy Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c index 3f95605427a7..1f4085116927 100644 --- a/drivers/staging/usbip/stub_dev.c +++ b/drivers/staging/usbip/stub_dev.c @@ -438,6 +438,8 @@ static int stub_probe(struct usb_interface *interface, if (err) { dev_err(&interface->dev, "create sysfs files for %s\n", udev_busid); + usb_set_intfdata(interface, 0); + stub_device_free(sdev); return err; }