Ordering of sibling modules is internal to the loader implementation. Unloading siblings following the requested module in the sibling list leads to unexpected unloading of seemingly random modules.
Signed-off-by: Michal Suchanek <[email protected]> --- hw/xfree86/loader/loadmod.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index 2347b8e..65bf055 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -1099,16 +1099,16 @@ UnloadModuleOrDriver(ModuleDescPtr mod) else LogMessageVerbSigSafe(X_INFO, 3, "UnloadModule: \"%s\"\n", mod->name); + RemoveChild(mod); if (mod->TearDownData != ModuleDuplicated) { if ((mod->TearDownProc) && (mod->TearDownData)) mod->TearDownProc(mod->TearDownData); LoaderUnload(mod->name, mod->handle); } - if (mod->child) + while (mod->child) UnloadModuleOrDriver(mod->child); - if (mod->sib) - UnloadModuleOrDriver(mod->sib); + free(mod->path); free(mod->name); free(mod); -- 1.7.10.4 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
