diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-03-25 21:08:32 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-18 14:13:52 -0700 |
commit | f4a728d09a96d6a83d9c3f39035b1aa7726892ea (patch) | |
tree | cb10303cf2094765f71081132753ce68a45e02ea /drivers/usb | |
parent | f941f6922533316556d4dc6eee9c19d4a832c560 (diff) | |
download | op-kernel-dev-f4a728d09a96d6a83d9c3f39035b1aa7726892ea.zip op-kernel-dev-f4a728d09a96d6a83d9c3f39035b1aa7726892ea.tar.gz |
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.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 */ |