summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-02-27 17:17:41 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-05-07 09:40:51 +1000
commit6f44d672aa34d343f63f0ea81ad58154a66b57ec (patch)
tree3c9ef17c93eaa7021e0e132d3a0cc2ab0334df63 /xkb
parent623981ddaeb8836f3b0939e527c0e943f9c4e974 (diff)
xkb: free XkbRulesUsed and XkbRulesDflt on extension cleanup
==2547== 1 bytes in 1 blocks are still reachable in loss record 1 of 111 ==2547== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236) ==2547== by 0x64D1551: strdup (strdup.c:43) ==2547== by 0x4802FB: Xstrdup (utils.c:1113) ==2547== by 0x585B6C: XkbSetRulesUsed (xkbInit.c:219) ==2547== by 0x58700F: InitKeyboardDeviceStruct (xkbInit.c:595) ==2547== by 0x419FA3: vfbKeybdProc (InitInput.c:74) ==2547== by 0x425A3D: ActivateDevice (devices.c:540) ==2547== by 0x425F65: InitAndStartDevices (devices.c:713) ==2547== by 0x5ACA57: main (main.c:259) and a few more of the above. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkbInit.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 4e8e267da..244c353c6 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -251,6 +251,21 @@ XkbSetRulesDflts(XkbRMLVOSet * rmlvo)
}
void
+XkbDeleteRulesUsed(void)
+{
+ free(XkbRulesUsed);
+ XkbRulesUsed = NULL;
+ free(XkbModelUsed);
+ XkbModelUsed = NULL;
+ free(XkbLayoutUsed);
+ XkbLayoutUsed = NULL;
+ free(XkbVariantUsed);
+ XkbVariantUsed = NULL;
+ free(XkbOptionsUsed);
+ XkbOptionsUsed = NULL;
+}
+
+void
XkbDeleteRulesDflts(void)
{
free(XkbRulesDflt);