From 4b03f11c4c795e14d4041bb79048521f12891ee4 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 25 Mar 2013 14:57:01 +0100 Subject: Bug #696173 - Various memory leaks --- e-util/e-action-combo-box.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'e-util') diff --git a/e-util/e-action-combo-box.c b/e-util/e-action-combo-box.c index 0b7a31c90a..5d114d21d7 100644 --- a/e-util/e-action-combo-box.c +++ b/e-util/e-action-combo-box.c @@ -105,12 +105,12 @@ action_combo_box_render_pixbuf (GtkCellLayout *layout, gboolean visible; gint width; - gtk_tree_model_get (model, iter, COLUMN_ACTION, &action, -1); - /* Do any of the actions have an icon? */ if (!combo_box->priv->group_has_icons) return; + gtk_tree_model_get (model, iter, COLUMN_ACTION, &action, -1); + /* A NULL action means the row is a separator. */ if (action == NULL) return; @@ -151,6 +151,7 @@ action_combo_box_render_pixbuf (GtkCellLayout *layout, "width", width, NULL); + g_object_unref (action); g_free (icon_name); g_free (stock_id); } @@ -198,6 +199,7 @@ action_combo_box_render_text (GtkCellLayout *layout, "xpad", xpad, NULL); + g_object_unref (action); g_free (label); } @@ -279,6 +281,7 @@ action_combo_box_update_model (EActionComboBox *combo_box) COLUMN_SORT, GTK_SORT_ASCENDING); gtk_combo_box_set_model ( GTK_COMBO_BOX (combo_box), GTK_TREE_MODEL (list_store)); + g_object_unref (list_store); action_combo_box_action_changed_cb ( combo_box->priv->action, @@ -401,6 +404,7 @@ action_combo_box_changed (GtkComboBox *combo_box) gtk_tree_model_get (model, &iter, COLUMN_ACTION, &action, -1); g_object_get (action, "value", &value, NULL); gtk_radio_action_set_current_value (action, value); + g_object_unref (action); } static void -- cgit v1.2.3