hidmap: Do not forget to initialize bitmap items to unset state
MFC after: 2 week
This commit is contained in:
parent
cded1fdb37
commit
bbed4b41c9
@ -451,7 +451,8 @@ hidmap_probe_hid_descr(void *d_ptr, hid_size_t d_len, uint8_t tlc_index,
|
|||||||
bool do_free = false;
|
bool do_free = false;
|
||||||
|
|
||||||
if (caps == NULL) {
|
if (caps == NULL) {
|
||||||
caps = malloc(HIDMAP_CAPS_SZ(nitems_map), M_DEVBUF, M_WAITOK);
|
caps = malloc(HIDMAP_CAPS_SZ(nitems_map), M_DEVBUF,
|
||||||
|
M_WAITOK | M_ZERO);
|
||||||
do_free = true;
|
do_free = true;
|
||||||
} else
|
} else
|
||||||
bzero (caps, HIDMAP_CAPS_SZ(nitems_map));
|
bzero (caps, HIDMAP_CAPS_SZ(nitems_map));
|
||||||
|
Loading…
Reference in New Issue
Block a user