From: Dirk-Jan C. Binnema Date: Tue, 3 Jul 2007 20:06:02 +0000 (+0000) Subject: * fix some memory leaks (valgrind helps) X-Git-Tag: git_migration_finished~2983 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=675c12de1bbd388200f571960ed4741e3073227a * fix some memory leaks (valgrind helps) pmo-trunk-r2555 --- diff --git a/src/maemo/modest-msg-view-window.c b/src/maemo/modest-msg-view-window.c index 175b5a5..eef77c7 100644 --- a/src/maemo/modest-msg-view-window.c +++ b/src/maemo/modest-msg-view-window.c @@ -510,7 +510,6 @@ modest_msg_view_window_new (TnyMsg *msg, ModestDimmingRulesGroup *toolbar_rules_group = NULL; GtkActionGroup *action_group = NULL; GError *error = NULL; - GdkPixbuf *window_icon = NULL; g_return_val_if_fail (msg, NULL); @@ -618,11 +617,6 @@ modest_msg_view_window_new (TnyMsg *msg, priv->last_search = NULL; - - /* Set window icon */ - window_icon = modest_platform_get_icon (MODEST_APP_MSG_VIEW_ICON); - gtk_window_set_icon (GTK_WINDOW (obj), window_icon); - /* Init the clipboard actions dim status */ modest_msg_view_grab_focus(MODEST_MSG_VIEW (priv->msg_view)); diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index 73fe5b7..8ef3743 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -1266,12 +1266,14 @@ modest_tny_account_store_get_server_account (ModestTnyAccountStore *self, g_printerr ("modest: could not get an id for account %s\n", account_name); else - account = modest_tny_account_store_get_tny_account_by (self, MODEST_TNY_ACCOUNT_STORE_QUERY_ID, id); + account = modest_tny_account_store_get_tny_account_by (self, + MODEST_TNY_ACCOUNT_STORE_QUERY_ID, id); if (!account) g_printerr ("modest: could not get tny %s account for %s (id=%s)\n", type == TNY_ACCOUNT_TYPE_STORE ? "store" : "transport", account_name, id ? id : ""); + g_free (id); return account; } diff --git a/src/modest-tny-msg.c b/src/modest-tny-msg.c index 5946883..89f8ea3 100644 --- a/src/modest-tny-msg.c +++ b/src/modest-tny-msg.c @@ -319,9 +319,10 @@ modest_tny_msg_find_body_part_from_mime_part (TnyMimePart *msg, gboolean want_ht iter = tny_list_create_iterator(parts); /* no parts? assume it's single-part message */ - if (tny_iterator_is_done(iter)) + if (tny_iterator_is_done(iter)) { + g_object_unref (G_OBJECT(iter)); return TNY_MIME_PART (g_object_ref(G_OBJECT(msg))); - else { + } else { gchar *content_type = NULL; do { part = TNY_MIME_PART(tny_iterator_get_current (iter));