USB HID: fix memory leak of usbhid_device
Add forgotten freeing of usbhid_device structure. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
de1a7b0328
commit
cda5ecf80b
1 changed files with 2 additions and 0 deletions
|
@ -877,6 +877,7 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue