ei-device: Don't leak fd when receiving the keymap

The ei_keymap dups the file descriptor, so lets close the one we
received from the demarshaller.

Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/334>
This commit is contained in:
Jonas Ådahl 2025-05-22 22:43:35 +02:00
parent 851f935fe1
commit ee27dd5c92

View file

@ -725,6 +725,7 @@ handle_msg_keymap(struct ei_keyboard *keyboard, uint32_t keymap_type, uint32_t k
struct ei_device *device = ei_keyboard_get_device(keyboard);
ei_device_set_keymap(device, keymap_type, keymap_fd, keymap_sz);
xclose (keymap_fd);
return NULL;
}