loading: Call module exit function also when not dlclosing module on unload

The proper thing to do.
Does not affect any of the current loaders.
This commit is contained in:
Kim Woelders 2023-08-18 18:43:11 +02:00
parent 66f48df4cf
commit 687e13b290
1 changed files with 3 additions and 3 deletions

View File

@ -237,6 +237,9 @@ __imlib_ProduceLoader(const char *file)
static void
__imlib_ConsumeLoader(ImlibLoader * l)
{
if (l->module->inex)
l->module->inex(0);
if (l->module->ldr_flags & LDR_FLAG_KEEP)
{
/* Not un/re-loadable - Move to unloaded loaders list */
@ -245,9 +248,6 @@ __imlib_ConsumeLoader(ImlibLoader * l)
return;
}
if (l->module->inex)
l->module->inex(0);
if (l->handle)
dlclose(l->handle);