diff options
author | Sebastian Keller <skeller@gnome.org> | 2020-06-08 10:02:49 +0200 |
---|---|---|
committer | Jonas Ã…dahl <jadahl@gmail.com> | 2020-06-11 07:23:18 +0000 |
commit | 51a8193c16e05e3862e22fd086c5900d8422890c (patch) | |
tree | 4d51df744f7469925e83cf5e8b9bebaf028c3a42 /src/wayland/meta-wayland-keyboard.c | |
parent | 94fb82137fd8aef1e18090744e6416beec683831 (diff) | |
download | mutter-51a8193c16e05e3862e22fd086c5900d8422890c.tar.gz |
wayland/keyboard: Fix anonymous file leak on repeated keymap changes
keymap_rofile was being overwritten without the old one being free'd on
repeated calls of meta_wayland_keyboard_take_keymap().
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1304
Diffstat (limited to 'src/wayland/meta-wayland-keyboard.c')
-rw-r--r-- | src/wayland/meta-wayland-keyboard.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c index dbc53c29f..0824007ad 100644 --- a/src/wayland/meta-wayland-keyboard.c +++ b/src/wayland/meta-wayland-keyboard.c @@ -147,6 +147,7 @@ meta_wayland_keyboard_take_keymap (MetaWaylandKeyboard *keyboard, } keymap_size = strlen (keymap_string) + 1; + g_clear_pointer (&xkb_info->keymap_rofile, meta_anonymous_file_free); xkb_info->keymap_rofile = meta_anonymous_file_new (keymap_size, (const uint8_t *) keymap_string); |