提交 47c7157f 编写于 作者: K Kulikov Vasiliy 提交者: Greg Kroah-Hartman

staging: usbip: fix memory leak

sdev should be freed if stub_add_files() failed.
Signed-off-by: NKulikov Vasiliy <segooon@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 ab366c1a
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册