mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-06 04:40:28 +01:00
xfree86: NULL option values are technically valid, don't strdup them
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
parent
f0d7e9db28
commit
f2a6735cfc
1 changed files with 1 additions and 1 deletions
|
|
@ -340,7 +340,7 @@ pointer
|
|||
xf86AddNewOption(pointer head, const char *name, const char *val)
|
||||
{
|
||||
/* XXX These should actually be allocated in the parser library. */
|
||||
char *tmp = strdup(val);
|
||||
char *tmp = val ? strdup(val) : NULL;
|
||||
char *tmp_name = strdup(name);
|
||||
|
||||
return xf86addNewOption(head, tmp_name, tmp);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue