From: Jiri Kosina Date: Mon, 30 Jul 2007 13:40:06 +0000 (+0200) Subject: USB HID: fix memory leak of usbhid_device X-Git-Tag: v2.6.23-rc2~16 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cda5ecf80bad94b4113722f037af818e7453dd2d;p=linux-2.6 USB HID: fix memory leak of usbhid_device Add forgotten freeing of usbhid_device structure. Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 3ff7468587..6e7393460e 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);