From: David Herrmann Date: Thu, 28 Aug 2014 10:21:33 +0000 (+0200) Subject: terminal: free xkb state on keyboard destruction X-Git-Tag: v217~728 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=200716a628b70fe723e7d4e09bb2ece10c10bdc0 terminal: free xkb state on keyboard destruction Fix leaking the xkb-state during keyboard destruction, leaking lots of xkb references into the wild. --- diff --git a/src/libsystemd-terminal/idev-keyboard.c b/src/libsystemd-terminal/idev-keyboard.c index 7ab4db2cf..03f54bb74 100644 --- a/src/libsystemd-terminal/idev-keyboard.c +++ b/src/libsystemd-terminal/idev-keyboard.c @@ -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);