[glade3/project-tree-model] Free the signals correctly
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade3/project-tree-model] Free the signals correctly
- Date: Wed, 12 May 2010 16:32:25 +0000 (UTC)
commit 5b204714a69f15e400d2575b4648fb5b4566a2eb
Author: Johannes Schmid <jhs gnome org>
Date: Wed May 12 18:31:27 2010 +0200
Free the signals correctly
This code is never reached but was wrong nevertheless.
gladeui/glade-widget-adaptor.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gladeui/glade-widget-adaptor.c b/gladeui/glade-widget-adaptor.c
index 262d412..70308fc 100644
--- a/gladeui/glade-widget-adaptor.c
+++ b/gladeui/glade-widget-adaptor.c
@@ -684,7 +684,9 @@ glade_widget_adaptor_finalize (GObject *object)
g_list_foreach (adaptor->packing_props, (GFunc) glade_property_class_free, NULL);
g_list_free (adaptor->packing_props);
- g_list_foreach (adaptor->signals, (GFunc) glade_signal_free, NULL);
+ /* Be careful, this list holds GladeSignalClass* not GladeSignal,
+ * thus g_free is enough as all members are const */
+ g_list_foreach (adaptor->signals, (GFunc) g_free, NULL);
g_list_free (adaptor->signals);
@@ -723,8 +725,6 @@ glade_widget_adaptor_finalize (GObject *object)
NULL);
g_list_free (adaptor->packing_actions);
}
-
- g_free (adaptor->priv);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -1178,6 +1178,7 @@ static void
glade_widget_adaptor_init (GladeWidgetAdaptor *adaptor)
{
adaptor->priv = GLADE_WIDGET_ADAPTOR_GET_PRIVATE (adaptor);
+
}
static void
@@ -3698,3 +3699,4 @@ glade_widget_adaptor_create_editable (GladeWidgetAdaptor *adaptor,
return GLADE_WIDGET_ADAPTOR_GET_CLASS
(adaptor)->create_editable (adaptor, type);
}
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]