summaryrefslogtreecommitdiffstats
path: root/drivers/staging/usbip
diff options
context:
space:
mode:
authorKulikov Vasiliy <segooon@gmail.com>2010-07-12 18:48:46 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-22 11:33:49 -0700
commit47c7157f3406e83648dad1c5c4e6e8c0f574dfc3 (patch)
tree535c6c67d4dc1bc73eccdcd9af09b15f901ff6e8 /drivers/staging/usbip
parentab366c1a23183b134eb19c5814f5c9fd3b0c831d (diff)
staging: usbip: fix memory leak
sdev should be freed if stub_add_files() failed. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/usbip')
-rw-r--r--drivers/staging/usbip/stub_dev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c
index 3f95605427a..1f408511692 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;
}