提交 f4a728d0 编写于 作者: J Julia Lawall 提交者: Greg Kroah-Hartman

drivers/usb/misc/usbtest.c: add kfrees

Free the two previously allocated buffers before exiting the function in an
error case.
Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f941f692
......@@ -2277,6 +2277,8 @@ usbtest_probe(struct usb_interface *intf, const struct usb_device_id *id)
if (status < 0) {
WARNING(dev, "couldn't get endpoints, %d\n",
status);
kfree(dev->buf);
kfree(dev);
return status;
}
/* may find bulk or ISO pipes */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册