aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'hardinfo2/util.c')
-rw-r--r--hardinfo2/util.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/hardinfo2/util.c b/hardinfo2/util.c
index 3a1409d2..f35f0ac1 100644
--- a/hardinfo2/util.c
+++ b/hardinfo2/util.c
@@ -589,13 +589,15 @@ static gboolean remove_module_methods(gpointer key, gpointer value, gpointer dat
static void module_unload(ShellModule * module)
{
GSList *entry;
- gchar *name;
-
- name = g_path_get_basename(g_module_name(module->dll));
- g_hash_table_foreach_remove(__module_methods, remove_module_methods, name);
if (module->dll) {
+ gchar *name;
+
+ name = g_path_get_basename(g_module_name(module->dll));
+ g_hash_table_foreach_remove(__module_methods, remove_module_methods, name);
+
g_module_close(module->dll);
+ g_free(name);
}
g_free(module->name);
@@ -610,7 +612,6 @@ static void module_unload(ShellModule * module)
g_slist_free(module->entries);
g_free(module);
- g_free(name);
}
void module_unload_all(void)