From fea14ed5d2088500649c1a1350a407922bac253c Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Sun, 17 May 2009 12:54:26 -0300 Subject: More Remote mode fixes --- hardinfo2/util.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'hardinfo2/util.c') 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) -- cgit v1.2.3