xkb: XkbInitRules() don't hard-crash the server on strdup() fail
No need to hard-crash the whole server if some strdup() calls failing, those fields already may be NULL, so consumers can handle that situation. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
1bac33b0da
commit
65a17ca552
|
@ -207,11 +207,11 @@ XkbInitRules(XkbRMLVOSet *rmlvo,
|
|||
const char *variant,
|
||||
const char *options)
|
||||
{
|
||||
rmlvo->rules = rules ? XNFstrdup(rules) : NULL;
|
||||
rmlvo->model = model ? XNFstrdup(model) : NULL;
|
||||
rmlvo->layout = layout ? XNFstrdup(layout) : NULL;
|
||||
rmlvo->variant = variant ? XNFstrdup(variant) : NULL;
|
||||
rmlvo->options = options ? XNFstrdup(options) : NULL;
|
||||
rmlvo->rules = rules ? strdup(rules) : NULL;
|
||||
rmlvo->model = model ? strdup(model) : NULL;
|
||||
rmlvo->layout = layout ? strdup(layout) : NULL;
|
||||
rmlvo->variant = variant ? strdup(variant) : NULL;
|
||||
rmlvo->options = options ? strdup(options) : NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue