From: Stef Walter Date: Mon, 21 Feb 2011 19:44:17 +0000 (+0100) Subject: Fix bug where we try to dlclose() modules we didn't load. X-Git-Tag: 0.1~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff7db14f0acae463165377f2d4b999e566298b40;p=p11-kit Fix bug where we try to dlclose() modules we didn't load. --- 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);