From 6f44d672aa34d343f63f0ea81ad58154a66b57ec Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 27 Feb 2012 17:17:41 +1000 Subject: 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 Reviewed-by: Keith Packard --- xkb/xkbInit.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'xkb') diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index 4e8e267da..244c353c6 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c @@ -250,6 +250,21 @@ XkbSetRulesDflts(XkbRMLVOSet * rmlvo) return; } +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) { -- cgit v1.2.3