* fix some memory leaks (valgrind helps)
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 3 Jul 2007 20:06:02 +0000 (20:06 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 3 Jul 2007 20:06:02 +0000 (20:06 +0000)
pmo-trunk-r2555

src/maemo/modest-msg-view-window.c
src/modest-tny-account-store.c
src/modest-tny-msg.c

index 175b5a5..eef77c7 100644 (file)
@@ -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));
 
index 73fe5b7..8ef3743 100644 (file)
@@ -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 : "<none>");
+       g_free (id);
 
        return account; 
 }
index 5946883..89f8ea3 100644 (file)
@@ -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));