summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-03-25 21:08:32 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-18 14:13:52 -0700
commitf4a728d09a96d6a83d9c3f39035b1aa7726892ea (patch)
treecb10303cf2094765f71081132753ce68a45e02ea /drivers/usb
parentf941f6922533316556d4dc6eee9c19d4a832c560 (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')
-rw-r--r--drivers/usb/misc/usbtest.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index cac67dea2ba..9dcb68f04f0 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 */