diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2025-01-28 10:15:08 +0100 |
|---|---|---|
| committer | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-01-28 11:19:52 +0100 |
| commit | 529ad4eaf450e558998e7417db5db6602e7fb497 (patch) | |
| tree | 2ef91c3a0b100a9c0bde8793cc6260d520ff4975 /src/devices | |
| parent | d3042e5358a91287d6ff9d8c745dc70af1ebdc90 (diff) | |
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.
Diffstat (limited to 'src/devices')
| -rw-r--r-- | src/devices/IKeyboard.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/devices/IKeyboard.cpp b/src/devices/IKeyboard.cpp index d1119772..4623fe84 100644 --- a/src/devices/IKeyboard.cpp +++ b/src/devices/IKeyboard.cpp @@ -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; |
