diff options
author | Milan Crha <mcrha@redhat.com> | 2013-03-25 21:57:01 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2013-03-25 21:57:01 +0800 |
commit | 4b03f11c4c795e14d4041bb79048521f12891ee4 (patch) | |
tree | 4287b0f6a5a629cb2fcd8e8e6b6bc6c80a36b219 | |
parent | 1c35d94851adfab4340464376118eea4d964fc8d (diff) | |
download | gsoc2013-evolution-4b03f11c4c795e14d4041bb79048521f12891ee4.tar gsoc2013-evolution-4b03f11c4c795e14d4041bb79048521f12891ee4.tar.gz gsoc2013-evolution-4b03f11c4c795e14d4041bb79048521f12891ee4.tar.bz2 gsoc2013-evolution-4b03f11c4c795e14d4041bb79048521f12891ee4.tar.lz gsoc2013-evolution-4b03f11c4c795e14d4041bb79048521f12891ee4.tar.xz gsoc2013-evolution-4b03f11c4c795e14d4041bb79048521f12891ee4.tar.zst gsoc2013-evolution-4b03f11c4c795e14d4041bb79048521f12891ee4.zip |
Bug #696173 - Various memory leaks
-rw-r--r-- | e-util/e-action-combo-box.c | 8 | ||||
-rw-r--r-- | mail/e-mail-display.c | 4 | ||||
-rw-r--r-- | mail/e-mail-request.c | 6 | ||||
-rw-r--r-- | shell/e-shell-searchbar.c | 2 |
4 files changed, 16 insertions, 4 deletions
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 diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c index 252eca7022..6794b144a4 100644 --- a/mail/e-mail-display.c +++ b/mail/e-mail-display.c @@ -623,7 +623,11 @@ toggle_widget_visibility (EAttachmentButton *button, if (e_attachment_button_get_expanded (button) && (e_attachment_store_get_num_attachments (store) == 0)) return; + else + children = NULL; } + + g_list_free (children); } webkit_dom_html_element_set_hidden ( diff --git a/mail/e-mail-request.c b/mail/e-mail-request.c index e00cc4d7d9..a4e229f94f 100644 --- a/mail/e-mail-request.c +++ b/mail/e-mail-request.c @@ -196,7 +196,7 @@ handle_mail_request (GSimpleAsyncResult *res, stream = g_memory_input_stream_new_from_data ( (gchar *) ba->data, ba->len, NULL); - g_simple_async_result_set_op_res_gpointer (res, stream, NULL); + g_simple_async_result_set_op_res_gpointer (res, stream, g_object_unref); } static GInputStream * @@ -278,7 +278,7 @@ exit: stream = get_empty_image_stream ( (gsize *) &request->priv->content_length); - g_simple_async_result_set_op_res_gpointer (res, stream, NULL); + g_simple_async_result_set_op_res_gpointer (res, stream, g_object_unref); } static void @@ -384,6 +384,8 @@ mail_request_send_finish (SoupRequest *request, if (stream == NULL) { /* We must always return something */ stream = g_memory_input_stream_new (); + } else { + g_object_ref (stream); } return stream; diff --git a/shell/e-shell-searchbar.c b/shell/e-shell-searchbar.c index 262b082d6c..5795407d0d 100644 --- a/shell/e-shell-searchbar.c +++ b/shell/e-shell-searchbar.c @@ -940,6 +940,8 @@ shell_searchbar_get_preferred_width (GtkWidget *widget, } } + g_list_free (children); + *minimum_width = max_minimum + COLUMN_SPACING; *natural_width = max_natural + COLUMN_SPACING; } |