From 4f10683c2c609917f94e56bce084aa42c64b68b5 Mon Sep 17 00:00:00 2001 From: xiphon Date: Wed, 3 Feb 2021 10:41:33 +0000 Subject: [PATCH] OSHelper: Linux - fix isCapsLock memory leak --- src/main/oshelper.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/oshelper.cpp b/src/main/oshelper.cpp index 7037e21e..2f8daf7f 100644 --- a/src/main/oshelper.cpp +++ b/src/main/oshelper.cpp @@ -223,6 +223,7 @@ bool OSHelper::isCapsLock() const unsigned n; XkbGetIndicatorState(d, XkbUseCoreKbd, &n); caps_state = (n & 0x01) == 1; + XCloseDisplay(d); } return caps_state; #elif defined(Q_OS_MAC)