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

Free the two previously allocated buffers before exiting the function in an
error case.

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Julia Lawall 2012-03-25 21:08:32 +02:00 • committed by Greg Kroah-Hartman
commit f4a728d09a

View file

@ -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 */