aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-15 02:15:36 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:35 +0800
commita4e2599f950cd2379a18a4c39cd27f87f090d492 (patch)
treefb1e71901c4824a0666f40d02c58a3ec72c9033c /widgets
parentecbb0bce4a854e7b617566f43a0b97f85bc63217 (diff)
downloadgsoc2013-evolution-a4e2599f950cd2379a18a4c39cd27f87f090d492.tar
gsoc2013-evolution-a4e2599f950cd2379a18a4c39cd27f87f090d492.tar.gz
gsoc2013-evolution-a4e2599f950cd2379a18a4c39cd27f87f090d492.tar.bz2
gsoc2013-evolution-a4e2599f950cd2379a18a4c39cd27f87f090d492.tar.lz
gsoc2013-evolution-a4e2599f950cd2379a18a4c39cd27f87f090d492.tar.xz
gsoc2013-evolution-a4e2599f950cd2379a18a4c39cd27f87f090d492.tar.zst
gsoc2013-evolution-a4e2599f950cd2379a18a4c39cd27f87f090d492.zip
Fix few memory leaks
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/e-cell-hbox.c6
-rw-r--r--widgets/table/e-table-extras.c14
2 files changed, 17 insertions, 3 deletions
diff --git a/widgets/table/e-cell-hbox.c b/widgets/table/e-cell-hbox.c
index 6710f60bd5..e8f6a0925d 100644
--- a/widgets/table/e-cell-hbox.c
+++ b/widgets/table/e-cell-hbox.c
@@ -266,6 +266,12 @@ ecv_dispose (GObject *object)
ecv->subcells = NULL;
ecv->subcell_count = 0;
+ g_free (ecv->model_cols);
+ ecv->model_cols = NULL;
+
+ g_free (ecv->def_size_cols);
+ ecv->def_size_cols = NULL;
+
G_OBJECT_CLASS (e_cell_hbox_parent_class)->dispose (object);
}
diff --git a/widgets/table/e-table-extras.c b/widgets/table/e-table-extras.c
index e42700d6c4..f6dc1118da 100644
--- a/widgets/table/e-table-extras.c
+++ b/widgets/table/e-table-extras.c
@@ -232,7 +232,7 @@ safe_unref (gpointer object)
static void
ete_init (ETableExtras *extras)
{
- ECell *cell;
+ ECell *cell, *sub_cell;
extras->priv = E_TABLE_EXTRAS_GET_PRIVATE (extras);
@@ -276,25 +276,33 @@ ete_init (ETableExtras *extras)
cell = e_cell_checkbox_new ();
e_table_extras_add_cell (extras, "checkbox", cell);
+ g_object_unref (cell);
cell = e_cell_date_new (NULL, GTK_JUSTIFY_LEFT);
e_table_extras_add_cell (extras, "date", cell);
+ g_object_unref (cell);
cell = e_cell_number_new (NULL, GTK_JUSTIFY_RIGHT);
e_table_extras_add_cell (extras, "number", cell);
+ g_object_unref (cell);
cell = e_cell_pixbuf_new ();
e_table_extras_add_cell (extras, "pixbuf", cell);
+ g_object_unref (cell);
cell = e_cell_size_new (NULL, GTK_JUSTIFY_RIGHT);
e_table_extras_add_cell (extras, "size", cell);
+ g_object_unref (cell);
cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
e_table_extras_add_cell (extras, "string", cell);
+ g_object_unref (cell);
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- cell = e_cell_tree_new (TRUE, cell);
+ sub_cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
+ cell = e_cell_tree_new (TRUE, sub_cell);
e_table_extras_add_cell (extras, "tree-string", cell);
+ g_object_unref (sub_cell);
+ g_object_unref (cell);
}
ETableExtras *