diff --git a/clients/multi-resource.c b/clients/multi-resource.c index eb4fd440..f3c42d0d 100644 --- a/clients/multi-resource.c +++ b/clients/multi-resource.c @@ -296,6 +296,8 @@ static void keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, uint32_t format, int fd, uint32_t size) { + /* Just so we don’t leak the keymap fd */ + close(fd); } static void diff --git a/clients/simple-egl.c b/clients/simple-egl.c index 8a086ef0..1afde36a 100644 --- a/clients/simple-egl.c +++ b/clients/simple-egl.c @@ -640,6 +640,8 @@ static void keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, uint32_t format, int fd, uint32_t size) { + /* Just so we don’t leak the keymap fd */ + close(fd); } static void diff --git a/clients/weston-info.c b/clients/weston-info.c index 4134191b..08c26191 100644 --- a/clients/weston-info.c +++ b/clients/weston-info.c @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -463,6 +464,8 @@ static void keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, uint32_t format, int fd, uint32_t size) { + /* Just so we don’t leak the keymap fd */ + close(fd); } static void