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>
This commit is contained in:
parent
623981ddae
commit
6f44d672aa
|
@ -1052,6 +1052,7 @@ CloseDownDevices(void)
|
|||
inputInfo.pointer = NULL;
|
||||
|
||||
XkbDeleteRulesDflts();
|
||||
XkbDeleteRulesUsed();
|
||||
|
||||
OsReleaseSignals();
|
||||
}
|
||||
|
|
|
@ -751,6 +751,9 @@ extern _X_EXPORT void XkbSetRulesDflts(XkbRMLVOSet * /* rmlvo */
|
|||
extern _X_EXPORT void XkbDeleteRulesDflts(void
|
||||
);
|
||||
|
||||
extern _X_EXPORT void XkbDeleteRulesUsed(void
|
||||
);
|
||||
|
||||
extern _X_EXPORT int SProcXkbDispatch(ClientPtr /* client */
|
||||
);
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user