xkb core - make layotu set safer by udp before we free

this should fix another possible crash vector.

This commit is contained in:
Carsten Haitzler 2019-08-09 00:40:18 +01:00
parent 7c4e58a2fc
commit 855c7028c4
1 changed files with 2 additions and 1 deletions

View File

@ -435,8 +435,9 @@ e_xkb_layout_set(const E_Config_XKB_Layout *cl)
if (e_config->xkb.dont_touch_my_damn_keyboard) return;
if (e_config_xkb_layout_eq(e_config->xkb.current_layout, cl)) return;
cl2 = e_config_xkb_layout_dup(e_config->xkb.current_layout);
e_config->xkb.current_layout = e_config_xkb_layout_dup(cl);
e_config->xkb.current_layout = cl2;
EINA_LIST_FOREACH(e_config->xkb.used_layouts, l, cl2)