diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-07-04 12:34:32 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-07-27 09:31:02 +1000 |
commit | f2a6735cfc07789cca81852b24a85578f200d83d (patch) | |
tree | f07298a3208fae359f1c19e3f88f0818bd7bef0c | |
parent | f0d7e9db28c374a3db359bcb63a7ce79fd84b541 (diff) |
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>
-rw-r--r-- | hw/xfree86/common/xf86Option.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c index 480f38694..a3a836fc1 100644 --- a/hw/xfree86/common/xf86Option.c +++ b/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); |