From 5286808b6cd439c0442a76169d7a58b1b7e71e8c Mon Sep 17 00:00:00 2001 From: Attila Fidan Date: Thu, 30 Jan 2025 09:39:31 +0000 Subject: input: close fd on no/unrecognized keymap format --- input.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'input.c') diff --git a/input.c b/input.c index 2db696c1..a2f30a0c 100644 --- a/input.c +++ b/input.c @@ -527,6 +527,7 @@ keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard, /* Verify keymap is in a format we understand */ switch ((enum wl_keyboard_keymap_format)format) { case WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP: + close(fd); return; case WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1: @@ -534,6 +535,7 @@ keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard, default: LOG_WARN("unrecognized keymap format: %u", format); + close(fd); return; } -- cgit v1.3