[mutter] wayland/keyboard: Fix anonymous file leak on repeated keymap changes
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland/keyboard: Fix anonymous file leak on repeated keymap changes
- Date: Thu, 11 Jun 2020 07:50:11 +0000 (UTC)
commit 51a8193c16e05e3862e22fd086c5900d8422890c
Author: Sebastian Keller <skeller gnome org>
Date: Mon Jun 8 10:02:49 2020 +0200
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
src/wayland/meta-wayland-keyboard.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c
index dbc53c29fd..0824007ad3 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]