summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2007-07-30 15:40:06 +0200
committerJiri Kosina <jkosina@suse.cz>2007-08-02 13:48:03 +0200
commitcda5ecf80bad94b4113722f037af818e7453dd2d (patch)
tree858d38bb6af8e74e8c8a32c33d6a2eb2cf5cf56e /drivers/hid
parentde1a7b03282310d143cb0add74e909daffedda01 (diff)
USB HID: fix memory leak of usbhid_device
Add forgotten freeing of usbhid_device structure. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/usbhid/hid-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 3ff74685875d..6e7393460ead 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -877,6 +877,7 @@ fail:
usb_free_urb(usbhid->urbin);
usb_free_urb(usbhid->urbout);
usb_free_urb(usbhid->urbctrl);
+ kfree(usbhid);
fail_no_usbhid:
hid_free_buffers(dev, hid);
hid_free_device(hid);
@@ -912,6 +913,7 @@ static void hid_disconnect(struct usb_interface *intf)
usb_free_urb(usbhid->urbin);
usb_free_urb(usbhid->urbctrl);
usb_free_urb(usbhid->urbout);
+ kfree(usbhid);
hid_free_buffers(hid_to_usb_dev(hid), hid);
hid_free_device(hid);