From ff7db14f0acae463165377f2d4b999e566298b40 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 21 Feb 2011 20:44:17 +0100 Subject: Fix bug where we try to dlclose() modules we didn't load. --- module/p11-kit-lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module') diff --git a/module/p11-kit-lib.c b/module/p11-kit-lib.c index ae88703..a868c4a 100644 --- a/module/p11-kit-lib.c +++ b/module/p11-kit-lib.c @@ -164,7 +164,8 @@ free_module_unlocked (void *data) /* Module must have no outstanding references */ assert (module->ref_count == 0); - dlclose (module->dl_module); + if (module->dl_module) + dlclose (module->dl_module); hash_free (module->config); free (module->name); free (module); -- cgit v1.2.3