aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common/xf86Option.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Option.c')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Option.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Option.c b/xorg-server/hw/xfree86/common/xf86Option.c
index 08f143347..576796d6c 100644
--- a/xorg-server/hw/xfree86/common/xf86Option.c
+++ b/xorg-server/hw/xfree86/common/xf86Option.c
@@ -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);