diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-02-19 12:02:22 +1030 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-02-19 12:05:13 +1030 |
commit | 6cbaf15e6109ba77819c4070f5b46c78237ec460 (patch) | |
tree | ea373e857244aa138e6dfe02b3a13db5b55c1e9c /hw | |
parent | 3abce3ea2b1f43bd111664d4a57e5ccd282acab0 (diff) |
xfree86: guard against NULL-pointer dereferences in xf86LoadModules.
Should have been part of 3abce3ea2b1f43bd111664d4a57e5ccd282acab0, but I
forgot to git-update-index before I committed.
Thanks to Bill Crawford for pointing it out.
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/common/xf86Init.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 0d90b9d43..7bcfdff40 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1951,10 +1951,11 @@ xf86LoadModules(char **list, pointer *optlist) if (!desc) { LoaderErrorMsg(NULL, name, errmaj, errmin); failed = TRUE; + } else { + xfree(desc->name); + xfree(desc); } xfree(name); - xfree(desc->name); - xfree(desc); } return !failed; } |