mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-09 22:28:06 +02:00
xkb: fail if we can't strdup our default rules
If we fail to set up the default rules our keymap is likely going to end up messed up, which means the client/user can't work correctly anyway. And if we're that low on memory that we can't allocate these rules, we're about to fall over anyway so why bother. Co-Authored-by: Claude Code <noreply@anthropic.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2184>
This commit is contained in:
parent
0d27fbb67c
commit
6bd204e2ab
1 changed files with 5 additions and 5 deletions
|
|
@ -107,11 +107,11 @@ static Bool XkbWantRulesProp = XKB_DFLT_RULES_PROP;
|
|||
void
|
||||
XkbGetRulesDflts(XkbRMLVOSet * rmlvo)
|
||||
{
|
||||
rmlvo->rules = strdup(XkbRulesDflt ? XkbRulesDflt : XKB_DFLT_RULES);
|
||||
rmlvo->model = strdup(XkbModelDflt ? XkbModelDflt : XKB_DFLT_MODEL);
|
||||
rmlvo->layout = strdup(XkbLayoutDflt ? XkbLayoutDflt : XKB_DFLT_LAYOUT);
|
||||
rmlvo->variant = strdup(XkbVariantDflt ? XkbVariantDflt : XKB_DFLT_VARIANT);
|
||||
rmlvo->options = strdup(XkbOptionsDflt ? XkbOptionsDflt : XKB_DFLT_OPTIONS);
|
||||
rmlvo->rules = XNFstrdup(XkbRulesDflt ? XkbRulesDflt : XKB_DFLT_RULES);
|
||||
rmlvo->model = XNFstrdup(XkbModelDflt ? XkbModelDflt : XKB_DFLT_MODEL);
|
||||
rmlvo->layout = XNFstrdup(XkbLayoutDflt ? XkbLayoutDflt : XKB_DFLT_LAYOUT);
|
||||
rmlvo->variant = XNFstrdup(XkbVariantDflt ? XkbVariantDflt : XKB_DFLT_VARIANT);
|
||||
rmlvo->options = XNFstrdup(XkbOptionsDflt ? XkbOptionsDflt : XKB_DFLT_OPTIONS);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue