xserver: Branch 'master'
Eamon Walsh
ewalsh at kemper.freedesktop.org
Wed Apr 8 23:29:33 PDT 2009
hw/xfree86/parser/Flags.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 3a0ee199dcec39596756a995996eac388acf6315
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date: Thu Apr 9 02:26:24 2009 -0400
config: fix crash caused by strdup(NULL)
diff --git a/hw/xfree86/parser/Flags.c b/hw/xfree86/parser/Flags.c
index b4e8d25..6865d35 100644
--- a/hw/xfree86/parser/Flags.c
+++ b/hw/xfree86/parser/Flags.c
@@ -235,11 +235,12 @@ XF86OptionPtr
xf86optionListDup (XF86OptionPtr opt)
{
XF86OptionPtr newopt = NULL;
+ char *val;
while (opt)
{
- newopt = xf86addNewOption(newopt, strdup(opt->opt_name),
- strdup(opt->opt_val));
+ val = opt->opt_val ? strdup(opt->opt_val) : NULL;
+ newopt = xf86addNewOption(newopt, strdup(opt->opt_name), val);
newopt->opt_used = opt->opt_used;
if (opt->opt_comment)
newopt->opt_comment = strdup(opt->opt_comment);
More information about the xorg-commit
mailing list