mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-25 10:40:25 +00: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user