Commit 4aa644e4 authored by Vojtech Pavlik's avatar Vojtech Pavlik Committed by Vojtech Pavlik

input: Fix memory leak in hiddev.c found by Stanford Checker.

parent 8f401a85
...@@ -727,6 +727,7 @@ int hiddev_connect(struct hid_device *hid) ...@@ -727,6 +727,7 @@ int hiddev_connect(struct hid_device *hid)
retval = usb_register_dev(&hiddev->intf, &hiddev_class); retval = usb_register_dev(&hiddev->intf, &hiddev_class);
if (retval) { if (retval) {
err("Not able to get a minor for this device."); err("Not able to get a minor for this device.");
kfree(hiddev);
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment