[PATCH] xfree86: Do not call dlclose(NULL) [regression after ab7f057]
Chris Wilson
chris at chris-wilson.co.uk
Sun Oct 3 08:51:25 PDT 2010
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 <chris at 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
More information about the xorg-devel
mailing list