summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xfree86/common/xf86Init.c5
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;
}