diff options
Diffstat (limited to 'src/instance.c')
-rw-r--r-- | src/instance.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/instance.c b/src/instance.c index e5cf54d..0c27ad7 100644 --- a/src/instance.c +++ b/src/instance.c @@ -292,12 +292,16 @@ suil_instance_free(SuilInstance* instance) instance->descriptor->cleanup(instance->handle); } + dlclose(instance->lib_handle); + // Close libraries and free everything if (instance->wrapper) { +#ifndef _WIN32 + // Never unload modules on windows, causes mysterious segfaults dlclose(instance->wrapper->lib); +#endif free(instance->wrapper); } - dlclose(instance->lib_handle); free(instance); } } |