HID: fix buffer allocations