|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From 200716a628b70fe723e7d4e09bb2ece10c10bdc0 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: David Herrmann <dh.herrmann@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Thu, 28 Aug 2014 12:21:33 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] terminal: free xkb state on keyboard destruction
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Fix leaking the xkb-state during keyboard destruction, leaking lots of xkb
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
references into the wild.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/libsystemd-terminal/idev-keyboard.c | 1 +
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 1 insertion(+)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/libsystemd-terminal/idev-keyboard.c b/src/libsystemd-terminal/idev-keyboard.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 7ab4db2cf7..03f54bb74f 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/libsystemd-terminal/idev-keyboard.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/libsystemd-terminal/idev-keyboard.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -550,6 +550,7 @@ int idev_keyboard_new(idev_device **out, idev_session *s, const char *name) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
static void keyboard_free(idev_device *d) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
idev_keyboard *k = keyboard_from_device(d);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ xkb_state_unref(k->xkb_state);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
free(k->repdata.keyboard.codepoints);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
free(k->repdata.keyboard.keysyms);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
free(k->evdata.keyboard.codepoints);
|