From 8a771785ad9026b12f0b23e89c69cafecbc3b752 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Wed, 4 Jul 2018 15:10:23 +0900 Subject: [PATCH] keyboard: free xkb keymap on destroy --- sway/input/keyboard.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index ec149d06..182536de 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c @@ -420,6 +420,9 @@ void sway_keyboard_destroy(struct sway_keyboard *keyboard) { if (!keyboard) { return; } + if (keyboard->keymap) { + xkb_keymap_unref(keyboard->keymap); + } wl_list_remove(&keyboard->keyboard_key.link); wl_list_remove(&keyboard->keyboard_modifiers.link); free(keyboard);