Skip to content

Commit

Permalink
staging: usbip: fix memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kulikov Vasiliy authored and Greg Kroah-Hartman committed Jul 22, 2010
1 parent ab366c1 commit 47c7157
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/usbip/stub_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 47c7157

Please sign in to comment.