aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mono/mono-plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mono/mono-plugin.c')
-rw-r--r--plugins/mono/mono-plugin.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mono/mono-plugin.c b/plugins/mono/mono-plugin.c
index a377d0aa34..d945ae5508 100644
--- a/plugins/mono/mono-plugin.c
+++ b/plugins/mono/mono-plugin.c
@@ -152,7 +152,6 @@ epm_finalise(GObject *o)
g_free(epm->location);
g_free(epm->handler);
- g_hash_table_foreach(p->methods, (GHFunc)g_free, NULL);
g_hash_table_destroy(p->methods);
g_free(epm->priv);
@@ -175,7 +174,10 @@ epm_init(GObject *o)
EPlugin *ep = (EPlugin *)o;
epm->priv = g_malloc0(sizeof(*epm->priv));
- epm->priv->methods = g_hash_table_new(g_str_hash, g_str_equal);
+ epm->priv->methods = g_hash_table_new_full(
+ g_str_hash, g_str_equal,
+ (GDestroyNotify) g_free,
+ (GDestroyNotify) NULL);
}
void *