diff options
author | Kulikov Vasiliy <segooon@gmail.com> | 2010-07-12 14:48:46 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-22 18:33:49 (GMT) |
commit | 47c7157f3406e83648dad1c5c4e6e8c0f574dfc3 (patch) | |
tree | 535c6c67d4dc1bc73eccdcd9af09b15f901ff6e8 /drivers/staging/usbip/stub_dev.c | |
parent | ab366c1a23183b134eb19c5814f5c9fd3b0c831d (diff) | |
download | linux-fsl-qoriq-47c7157f3406e83648dad1c5c4e6e8c0f574dfc3.tar.xz |
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/stub_dev.c')
-rw-r--r-- | drivers/staging/usbip/stub_dev.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |