diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-03-25 15:08:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-18 17:13:52 -0400 |
commit | f4a728d09a96d6a83d9c3f39035b1aa7726892ea (patch) | |
tree | cb10303cf2094765f71081132753ce68a45e02ea /drivers/usb/misc/usbtest.c | |
parent | f941f6922533316556d4dc6eee9c19d4a832c560 (diff) |
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 cac67dea2bac..9dcb68f04f03 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) | |||
2277 | if (status < 0) { | 2277 | if (status < 0) { |
2278 | WARNING(dev, "couldn't get endpoints, %d\n", | 2278 | WARNING(dev, "couldn't get endpoints, %d\n", |
2279 | status); | 2279 | status); |
2280 | kfree(dev->buf); | ||
2281 | kfree(dev); | ||
2280 | return status; | 2282 | return status; |
2281 | } | 2283 | } |
2282 | /* may find bulk or ISO pipes */ | 2284 | /* may find bulk or ISO pipes */ |