From: Kulikov Vasiliy Date: Mon, 12 Jul 2010 14:48:46 +0000 (+0400) Subject: staging: usbip: fix memory leak X-Git-Tag: v2.6.36-rc1~520^2~1^2~185 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47c7157f3406e83648dad1c5c4e6e8c0f574dfc3;p=profile%2Fivi%2Fkernel-x86-ivi.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 3f95605..1f40851 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; }