xfree86: Do not call dlclose(NULL) [regression after ab7f057]

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@chris-wilson.co.uk>
Cc: Adam Jackson <ajax@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Chris Wilson 2010-10-03 16:56:03 +01:00 committed by Keith Packard
parent 533faf7f43
commit 9a893fe52f

View File

@ -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;