From: Alberto Garcia Date: Wed, 30 Jan 2008 17:32:33 +0000 (+0000) Subject: Fixed several TnyIterator leaks X-Git-Tag: git_migration_finished~1736 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=518e2f866b4ddaa35443cef48c874a358be0851f Fixed several TnyIterator leaks pmo-trunk-r4115 --- diff --git a/src/maemo/modest-msg-edit-window.c b/src/maemo/modest-msg-edit-window.c index aab42cb..0f127a3 100644 --- a/src/maemo/modest-msg-edit-window.c +++ b/src/maemo/modest-msg-edit-window.c @@ -1008,6 +1008,7 @@ replace_with_images (ModestMsgEditWindow *self, TnyList *attachments) } g_object_unref (part); } + g_object_unref (iter); } static void @@ -1085,6 +1086,7 @@ update_last_cid (ModestMsgEditWindow *self, TnyList *attachments) } g_object_unref (part); } + g_object_unref (iter); } static void @@ -1628,6 +1630,7 @@ modest_msg_edit_window_get_msg_data (ModestMsgEditWindow *edit_window) g_object_unref (part); tny_iterator_next (att_iter); } + g_object_unref (att_iter); data->priority_flags = priv->priority_flags; @@ -2336,6 +2339,7 @@ modest_msg_edit_window_remove_attachments (ModestMsgEditWindow *window, gtk_text_buffer_set_modified (priv->text_buffer, TRUE); g_object_unref (mime_part); } + g_object_unref (iter); } g_object_unref (att_list); diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index 63f2ab6..ac77bfc 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -1332,6 +1332,7 @@ modest_tny_account_store_get_server_account (ModestTnyAccountStore *self, g_object_unref (tmp_account); tny_iterator_next (iter); } + g_object_unref (iter); if (!found) { g_printerr ("modest: %s: could not get tny %s account for %s\n." \ @@ -1851,6 +1852,7 @@ modest_tny_account_store_find_msg_in_outboxes (ModestTnyAccountStore *self, g_object_unref (folder); tny_iterator_next (folders_iter); } + g_object_unref (folders_iter); g_object_unref (folders); g_object_unref (account); diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 0a08812..f6f7892 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -4470,6 +4470,7 @@ open_msg_for_purge_cb (ModestMailOperation *mail_op, tny_iterator_next (iter); } + g_object_unref (iter); tny_msg_rewrite_cache (msg); } @@ -4477,7 +4478,6 @@ open_msg_for_purge_cb (ModestMailOperation *mail_op, /* This string no longer exists, refer to NB#75415 for more info */ /* modest_platform_information_banner (NULL, NULL, _("mail_ib_attachment_already_purged")); */ } - g_object_unref (iter); modest_window_mgr_unregister_header (mgr, header); @@ -4490,7 +4490,6 @@ modest_ui_actions_on_main_window_remove_attachments (GtkAction *action, { GtkWidget *header_view; TnyList *header_list; - TnyIterator *iter; TnyHeader *header; TnyHeaderFlags flags; ModestWindow *msg_view_window = NULL; @@ -4508,7 +4507,7 @@ modest_ui_actions_on_main_window_remove_attachments (GtkAction *action, } if (tny_list_get_length (header_list) == 1) { - iter = tny_list_create_iterator (header_list); + TnyIterator *iter = tny_list_create_iterator (header_list); header = TNY_HEADER (tny_iterator_get_current (iter)); g_object_unref (iter); } else