[libpeas] Fix PeasEngine's dispose
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Fix PeasEngine's dispose
- Date: Wed, 9 Feb 2011 00:14:26 +0000 (UTC)
commit b803149433975b1295bd733aaabc32d442f61385
Author: Garrett Regier <alias301 gmail com>
Date: Sun Feb 6 02:33:55 2011 -0800
Fix PeasEngine's dispose
Before it would cause a double free if run more than once.
libpeas/peas-engine.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/libpeas/peas-engine.c b/libpeas/peas-engine.c
index 9a60fbd..a1a0530 100644
--- a/libpeas/peas-engine.c
+++ b/libpeas/peas-engine.c
@@ -413,7 +413,16 @@ peas_engine_dispose (GObject *object)
engine->priv->loaders = NULL;
}
- /* and finally free the infos */
+ G_OBJECT_CLASS (peas_engine_parent_class)->dispose (object);
+}
+
+static void
+peas_engine_finalize (GObject *object)
+{
+ PeasEngine *engine = PEAS_ENGINE (object);
+ GList *item;
+
+ /* free the infos */
for (item = engine->priv->plugin_list; item; item = item->next)
_peas_plugin_info_unref (PEAS_PLUGIN_INFO (item->data));
@@ -427,14 +436,6 @@ peas_engine_dispose (GObject *object)
g_slice_free (SearchPath, sp);
}
- G_OBJECT_CLASS (peas_engine_parent_class)->dispose (object);
-}
-
-static void
-peas_engine_finalize (GObject *object)
-{
- PeasEngine *engine = PEAS_ENGINE (object);
-
g_list_free (engine->priv->plugin_list);
g_list_free (engine->priv->search_paths);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]