diff options
Diffstat (limited to 'ui/qt5/inputpage.cc')
-rw-r--r-- | ui/qt5/inputpage.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/qt5/inputpage.cc b/ui/qt5/inputpage.cc index 2807c02..4717300 100644 --- a/ui/qt5/inputpage.cc +++ b/ui/qt5/inputpage.cc @@ -91,10 +91,14 @@ void InputPage::initializePage() { /* Select the current keyboard layout, if available. */ Display *dpy = XOpenDisplay(nullptr); if(dpy != nullptr) { - XkbRF_VarDefsRec vardefs; + XkbRF_VarDefsRec vardefs{}; XkbRF_GetNamesProp(dpy, nullptr, &vardefs); QList<QListWidgetItem *> items = layoutList->findItems(vardefs.layout, Qt::MatchExactly); if(!items.empty()) layoutList->setCurrentItem(items.at(0)); + free(vardefs.model); + free(vardefs.layout); + free(vardefs.variant); + free(vardefs.options); XCloseDisplay(dpy); } #endif /* HAS_INSTALL_ENV */ |