diff options
author | Milan Crha <mcrha@redhat.com> | 2011-02-15 02:15:36 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-02-15 02:15:36 +0800 |
commit | 4b9ac3879d25d14cbaaab9237626257c3561f7ff (patch) | |
tree | f9a445d2652644ea9ed64da2cd76f1ad442e83b3 /widgets/table/e-table-extras.c | |
parent | cf41379058d6e78ea138603186acb8174c58e0ca (diff) | |
download | gsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.tar.gz gsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.tar.zst gsoc2013-evolution-4b9ac3879d25d14cbaaab9237626257c3561f7ff.zip |
Fix few memory leaks
Diffstat (limited to 'widgets/table/e-table-extras.c')
-rw-r--r-- | widgets/table/e-table-extras.c | 14 |
1 files changed, 11 insertions, 3 deletions
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 * |