ikeyboard: free xkbSymState in clearManuallyAllocd

asan reported a leak on xkbSymState on destruction, because it wasnt
beeing unrefed, was only being unrefed on calls to updateXKBTranslationState.
This commit is contained in:
Tom Englund
2025-01-28 10:15:08 +01:00
committed by Vaxry
parent d3042e5358
commit 529ad4eaf4

View File

@@ -44,6 +44,10 @@ void IKeyboard::clearManuallyAllocd() {
if (xkbKeymapFD >= 0)
close(xkbKeymapFD);
if (xkbSymState)
xkb_state_unref(xkbSymState);
xkbSymState = nullptr;
xkbKeymap = nullptr;
xkbState = nullptr;
xkbStaticState = nullptr;