terminal: free xkb state on keyboard destruction

Fix leaking the xkb-state during keyboard destruction, leaking lots of xkb
references into the wild.
This commit is contained in:
David Herrmann
2014-08-28 12:45:51 +02:00
parent 3125b3ef5d
commit 200716a628
+1
View File
@@ -550,6 +550,7 @@ int idev_keyboard_new(idev_device **out, idev_session *s, const char *name) {
static void keyboard_free(idev_device *d) {
idev_keyboard *k = keyboard_from_device(d);
xkb_state_unref(k->xkb_state);
free(k->repdata.keyboard.codepoints);
free(k->repdata.keyboard.keysyms);
free(k->evdata.keyboard.codepoints);