Fix crash due to out-of-order frees. (#7208)

* Fix crash due to out-of-order frees.

Don't free the kdbDescr until we've freed the names it contains. This
fixes a SIGBUS crash on FreeBSD (and maybe other platforms too?) when
pressing special keys (e.g., the Windows key) on a client.

* Update ChangeLog

Co-authored-by: Serhii Hadzhilov <serhii-external@symless.com>
This commit is contained in:
Jonathan Anderson 2022-10-11 12:22:32 -02:30 committed by GitHub
parent 7d4a368864
commit b2b887cf43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,9 @@
1.14.6
======
Bug fixes:
- #7208 Fix crash on FreeBSD when pressing special keys on a client.
Enhancements:
- #7222 Ability to initiate non-TLS connection from server
- #7225 Ability to initiate TLS connection from server

View File

@ -148,8 +148,8 @@ AppUtilUnix::getCurrentLanguageCode()
groupStartI = strI + 1;
}
XFree(kbdDescr);
XkbFreeNames(kbdDescr, XkbSymbolsNameMask, true);
XFree(kbdDescr);
XCloseDisplay(display);
result = X11LayoutsParser::convertLayotToISO("/usr/share/X11/xkb/rules/evdev.xml", result);