diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-03-25 19:08:32 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-18 21:13:52 (GMT) |
commit | f4a728d09a96d6a83d9c3f39035b1aa7726892ea (patch) | |
tree | cb10303cf2094765f71081132753ce68a45e02ea /drivers/usb/misc/usbtest.c | |
parent | f941f6922533316556d4dc6eee9c19d4a832c560 (diff) | |
download | linux-f4a728d09a96d6a83d9c3f39035b1aa7726892ea.tar.xz |
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 <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc/usbtest.c')
-rw-r--r-- | drivers/usb/misc/usbtest.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index cac67de..9dcb68f 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -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 */ |