aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-15 02:15:36 +0800
committerMilan Crha <mcrha@redhat.com>2011-02-15 02:15:36 +0800
commit4b9ac3879d25d14cbaaab9237626257c3561f7ff (patch)
treef9a445d2652644ea9ed64da2cd76f1ad442e83b3 /widgets
parentcf41379058d6e78ea138603186acb8174c58e0ca (diff)
downloadgsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.tar.gz
gsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.tar.zst
gsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.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 *