During unwind following an error when attempting to a load a module, we
attempt to call dlclose on a potentially NULL handle. This is a
side-effect of removing the abstraction layer in ab7f057.

Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
Cc: ab7f057ce9df4e905b12cebc1e587b9a7f200418
---
 hw/xfree86/loader/loader.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index 8921831..694c1c2 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -184,7 +184,8 @@ void
 LoaderUnload(const char *name, void *handle)
 {
     xf86Msg(X_INFO, "Unloading %s\n", name);
-    dlclose(handle);
+    if (handle)
+       dlclose(handle);
 }
 
 unsigned long LoaderOptions = 0;
-- 
1.7.1

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to