diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-03 16:56:03 +0100 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-10-04 11:46:07 -0700 |
commit | 9a893fe52f1bfd415e9ffd9d2f5aff5c4da7a756 (patch) | |
tree | 07a823cf9ceeefe7d59d5c379857f89594b11f61 | |
parent | 533faf7f43cb4b5155a74d78d6144b702e227efa (diff) |
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>
-rw-r--r-- | 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 89218312a..694c1c2b0 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; |