[gtk+] wayland: Don't leak the tmp_keymap
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Don't leak the tmp_keymap
- Date: Fri, 5 Sep 2014 22:07:35 +0000 (UTC)
commit 4764ba4b0eb0b64f10d5be9bba4b736e8cdd105f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Sep 5 14:31:44 2014 -0700
wayland: Don't leak the tmp_keymap
This is a static variable, so setting it every time will leak the
previous one.
gdk/wayland/gdkdisplay-wayland.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index dea982a..20d63bb 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -534,7 +534,8 @@ _gdk_wayland_display_get_keymap (GdkDisplay *display)
if (core_keyboard)
return _gdk_wayland_device_get_keymap (core_keyboard);
- tmp_keymap = _gdk_wayland_keymap_new ();
+ if (!tmp_keymap)
+ tmp_keymap = _gdk_wayland_keymap_new ();
return tmp_keymap;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]