summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xfree86/common/xf86Init.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 41cf1d17c..0d90b9d43 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1922,6 +1922,7 @@ xf86LoadModules(char **list, pointer *optlist)
int i;
char *name;
Bool failed = FALSE;
+ ModuleDescPtr desc;
if (!list)
return TRUE;
@@ -1945,11 +1946,15 @@ xf86LoadModules(char **list, pointer *optlist)
else
opt = NULL;
- if (!LoadModule(name, NULL, NULL, NULL, opt, NULL, &errmaj, &errmin)) {
+ desc = LoadModule(name, NULL, NULL, NULL, opt, NULL, &errmaj,
+ &errmin);
+ if (!desc) {
LoaderErrorMsg(NULL, name, errmaj, errmin);
failed = TRUE;
}
xfree(name);
+ xfree(desc->name);
+ xfree(desc);
}
return !failed;
}