clients/window: clean up xkb compose data

This fixes ASan report:
	SUMMARY: AddressSanitizer: 151360 byte(s) leaked in 451 allocation(s).

The leaks can be observed if you let weston-desktop-shell start fully
before shutting down Weston. Many simple test suite tests are too fast
to hit this, or do not even use desktop-shell.

This clean-up code is copied from keyboard_handle_keymap().

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 4 years ago
parent 091b1554da
commit 2af436bb9c
  1. 2
      clients/window.c

@ -5878,6 +5878,8 @@ output_get_model(struct output *output)
static void static void
fini_xkb(struct input *input) fini_xkb(struct input *input)
{ {
xkb_compose_state_unref(input->xkb.compose_state);
xkb_compose_table_unref(input->xkb.compose_table);
xkb_state_unref(input->xkb.state); xkb_state_unref(input->xkb.state);
xkb_keymap_unref(input->xkb.keymap); xkb_keymap_unref(input->xkb.keymap);
} }

Loading…
Cancel
Save