Fix most of the leaks referenced in bug #3155
authorColin Leroy <colin@colino.net>
Mon, 28 Apr 2014 10:28:42 +0000 (12:28 +0200)
committerColin Leroy <colin@colino.net>
Mon, 28 Apr 2014 10:28:42 +0000 (12:28 +0200)
16 files changed:
src/compose.c
src/folder.c
src/folderview.c
src/gtk/combobox.c
src/gtk/gtkcmoptionmenu.c
src/gtk/gtkutils.c
src/gtk/inputdialog.c
src/gtk/menu.c
src/gtk/quicksearch.c
src/imap.c
src/main.c
src/mainwindow.c
src/mimeview.c
src/prefs_account.c
src/prefs_themes.c
src/quote_fmt.c

index aff17233ca6749c1faa95210c2064cf78b7433e2..41f0554bd956c370d9c2506b5d94355f4191cf1b 100644 (file)
@@ -5348,6 +5348,8 @@ static gint compose_redirect_write_headers(Compose *compose, FILE *fp)
                }
                generate_msgid(buf, sizeof(buf), addr);
                err |= (fprintf(fp, "Resent-Message-ID: <%s>\n", buf) < 0);
                }
                generate_msgid(buf, sizeof(buf), addr);
                err |= (fprintf(fp, "Resent-Message-ID: <%s>\n", buf) < 0);
+               if (compose->msgid)
+                       g_free(compose->msgid);
                compose->msgid = g_strdup(buf);
        } else {
                compose->msgid = NULL;
                compose->msgid = g_strdup(buf);
        } else {
                compose->msgid = NULL;
@@ -6424,6 +6426,8 @@ static gchar *compose_get_header(Compose *compose)
                }
                generate_msgid(buf, sizeof(buf), addr);
                g_string_append_printf(header, "Message-ID: <%s>\n", buf);
                }
                generate_msgid(buf, sizeof(buf), addr);
                g_string_append_printf(header, "Message-ID: <%s>\n", buf);
+               if (compose->msgid)
+                       g_free(compose->msgid);
                compose->msgid = g_strdup(buf);
        } else {
                compose->msgid = NULL;
                compose->msgid = g_strdup(buf);
        } else {
                compose->msgid = NULL;
index 0cbbfb090695a16382f07a5714cc95df0d9c23c9..a248abcab28e7a38d11e79301644844781edecb5 100644 (file)
@@ -3783,17 +3783,18 @@ gint folder_item_remove_msgs(FolderItem *item, GSList *msglist)
                                                        real_list,
                                                        NULL);
        }
                                                        real_list,
                                                        NULL);
        }
-       while (ret == 0 && real_list != NULL) {
-               MsgInfo *msginfo = (MsgInfo *)real_list->data;
+       cur = real_list;
+       while (ret == 0 && cur != NULL) {
+               MsgInfo *msginfo = (MsgInfo *)cur->data;
                if (msginfo && MSG_IS_LOCKED(msginfo->flags)) {
                if (msginfo && MSG_IS_LOCKED(msginfo->flags)) {
-                       real_list = real_list->next;
+                       cur = cur->next;
                        continue;
                }
                if (!item->folder->klass->remove_msgs)
                        ret = folder_item_remove_msg(item, msginfo->msgnum);
                if (ret != 0) break;
                msgcache_remove_msg(item->cache, msginfo->msgnum);
                        continue;
                }
                if (!item->folder->klass->remove_msgs)
                        ret = folder_item_remove_msg(item, msginfo->msgnum);
                if (ret != 0) break;
                msgcache_remove_msg(item->cache, msginfo->msgnum);
-               real_list = real_list->next;
+               cur = cur->next;
        }
        g_slist_free(real_list);
        folder_item_scan_full(item, FALSE);
        }
        g_slist_free(real_list);
        folder_item_scan_full(item, FALSE);
@@ -4261,56 +4262,40 @@ static gchar * folder_item_get_tree_identifier(FolderItem * item)
 
 static FolderItem *folder_create_processing_folder(int account_id)
 {
 
 static FolderItem *folder_create_processing_folder(int account_id)
 {
-       Folder *processing_folder;
+       static Folder *processing_folder = NULL;
        FolderItem *processing_folder_item;
        FolderItem *processing_folder_item;
-       gchar      *tmpname;
 
        gchar *processing_folder_item_name = NULL;
 
         processing_folder_item_name = g_strdup_printf("%s-%d", PROCESSING_FOLDER_ITEM, account_id);
 
 
        gchar *processing_folder_item_name = NULL;
 
         processing_folder_item_name = g_strdup_printf("%s-%d", PROCESSING_FOLDER_ITEM, account_id);
 
-       if ((processing_folder = folder_find_from_name(TEMP_FOLDER, mh_get_class())) == NULL) {
-               gchar *tmppath;
-
-               tmppath =
+       if (processing_folder == NULL) {
+               gchar *tmppath =
                    g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
                                "tempfolder", NULL);
                processing_folder =
                    folder_new(mh_get_class(), TEMP_FOLDER, tmppath);
                g_free(tmppath);
                    g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
                                "tempfolder", NULL);
                processing_folder =
                    folder_new(mh_get_class(), TEMP_FOLDER, tmppath);
                g_free(tmppath);
+               tmppath = NULL;
+               
+               g_assert(processing_folder != NULL);
+               processing_folder->klass->scan_tree(processing_folder);
        }
        g_assert(processing_folder != NULL);
 
        }
        g_assert(processing_folder != NULL);
 
-       debug_print("tmpparentroot %s\n", LOCAL_FOLDER(processing_folder)->rootpath);
-        /* FIXME: [W32] The code below does not correctly merge
-           relative filenames; there should be a function to handle
-           this.  */
-       if (!is_relative_filename(LOCAL_FOLDER(processing_folder)->rootpath))
-               tmpname = g_strconcat(LOCAL_FOLDER(processing_folder)->rootpath,
-                                     G_DIR_SEPARATOR_S, 
-                                     processing_folder_item_name,
-                                     NULL);
-       else
-               tmpname = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
-                                     LOCAL_FOLDER(processing_folder)->rootpath,
-                                     G_DIR_SEPARATOR_S, 
-                                     processing_folder_item_name,
-                                     NULL);
-
-       if (!is_dir_exist(tmpname)) {
-               debug_print("*TMP* creating %s\n", tmpname);
+       processing_folder_item = folder_find_child_item_by_name(FOLDER_ITEM(processing_folder->node->data),
+                                       processing_folder_item_name);
+       if (processing_folder_item) {
+               debug_print("*TMP* already created %s\n", folder_item_get_path(processing_folder_item));
+       } else {
                processing_folder_item = processing_folder->klass->create_folder(processing_folder,
                                                                                 processing_folder->node->data,
                                                                                 processing_folder_item_name);
                processing_folder_item = processing_folder->klass->create_folder(processing_folder,
                                                                                 processing_folder->node->data,
                                                                                 processing_folder_item_name);
-       } else {
-               debug_print("*TMP* already created\n");
-               processing_folder_item = folder_item_new(processing_folder, processing_folder_item_name, processing_folder_item_name);
-               g_assert(processing_folder_item);
-               folder_item_append(processing_folder->node->data, processing_folder_item);
-       }
+               folder_item_append(FOLDER_ITEM(processing_folder->node->data), processing_folder_item);
+               debug_print("*TMP* creating %s\n", folder_item_get_path(processing_folder_item));
+       } 
        g_free(processing_folder_item_name);
        g_assert(processing_folder_item != NULL);
        g_free(processing_folder_item_name);
        g_assert(processing_folder_item != NULL);
-       g_free(tmpname);
 
        return(processing_folder_item);
 }
 
        return(processing_folder_item);
 }
index db210be9d23b2e16bc9ebf815fa0bb69354641bc..abbc1dea48d04b5bc60cccd68fe3fc445e369534 100644 (file)
@@ -1613,6 +1613,7 @@ static void folderview_update_node(FolderView *folderview, GtkCMCTreeNode *node)
                                break;
                        }
                }
                                break;
                        }
                }
+               procmsg_msg_list_free(list);
        } else {
                /* if unread messages exist, print with bold font */
                use_bold = (item->unread_msgs > 0|| item->new_msgs > 0) 
        } else {
                /* if unread messages exist, print with bold font */
                use_bold = (item->unread_msgs > 0|| item->new_msgs > 0) 
index db0e68f8191557aa144da315dfa489a953a44723..b4967f5174d50aa7e754e946e245ef25e59c6c12 100644 (file)
@@ -125,7 +125,10 @@ static gboolean _select_by_text_func(GtkTreeModel *model,  GtkTreePath *path,
        gtk_tree_model_get (GTK_TREE_MODEL(model), iter, 0, &curdata, -1);
        if (!g_utf8_collate(data, curdata)) {
                gtk_combo_box_set_active_iter(combobox, iter);
        gtk_tree_model_get (GTK_TREE_MODEL(model), iter, 0, &curdata, -1);
        if (!g_utf8_collate(data, curdata)) {
                gtk_combo_box_set_active_iter(combobox, iter);
+               g_free(curdata);
                return TRUE;
                return TRUE;
+       } else {
+               g_free(curdata);
        }
 
        return FALSE;
        }
 
        return FALSE;
index eeaa157d400494bfe922139f37a6c51fb348b6b4..0333f3ef704e31bb50765b42f509e26f185b6134 100644 (file)
@@ -861,7 +861,7 @@ static void
 gtk_cmoption_menu_calc_size (GtkCMOptionMenu *option_menu)
 {
   GtkWidget *child;
 gtk_cmoption_menu_calc_size (GtkCMOptionMenu *option_menu)
 {
   GtkWidget *child;
-  GList *children;
+  GList *children, *walk;
   GtkRequisition child_requisition;
   gint old_width = option_menu->width;
   gint old_height = option_menu->height;
   GtkRequisition child_requisition;
   gint old_width = option_menu->width;
   gint old_height = option_menu->height;
@@ -874,10 +874,11 @@ gtk_cmoption_menu_calc_size (GtkCMOptionMenu *option_menu)
   if (option_menu->menu)
     {
       children = gtk_container_get_children (GTK_CONTAINER (GTK_MENU_SHELL (option_menu->menu)));
   if (option_menu->menu)
     {
       children = gtk_container_get_children (GTK_CONTAINER (GTK_MENU_SHELL (option_menu->menu)));
-      while (children)
+      walk = children;
+      while (walk)
        {
        {
-         child = children->data;
-         children = children->next;
+         child = walk->data;
+         walk = walk->next;
 
          if (gtk_widget_get_visible (child))
            {
 
          if (gtk_widget_get_visible (child))
            {
index 0c95fccf0d5dc6c110da1189fd824399eb354242..1f05268f83710b03b63db08d070a95a37f924f70 100644 (file)
@@ -1289,6 +1289,8 @@ static gboolean _combobox_separator_func(GtkTreeModel *model,
 
        if( txt == NULL )
                return TRUE;
 
        if( txt == NULL )
                return TRUE;
+       
+       g_free(txt);
        return FALSE;
 }
 
        return FALSE;
 }
 
index 3074007f694e32860897838216062d3e8cb43489..00c273307107ca1b6c709a0122ca0f8f7dec001b 100644 (file)
@@ -372,8 +372,6 @@ static void input_dialog_create(gboolean is_password)
        remember_checkbtn = gtk_check_button_new_with_label(_("Remember this"));
        gtk_box_pack_start(GTK_BOX(vbox), remember_checkbtn, FALSE, FALSE, 0);
 
        remember_checkbtn = gtk_check_button_new_with_label(_("Remember this"));
        gtk_box_pack_start(GTK_BOX(vbox), remember_checkbtn, FALSE, FALSE, 0);
 
-       hbox = gtk_hbox_new(TRUE, 0);
-
        gtkut_stock_button_set_create(&confirm_area,
                                      &cancel_button, GTK_STOCK_CANCEL,
                                      &ok_button, GTK_STOCK_OK,
        gtkut_stock_button_set_create(&confirm_area,
                                      &cancel_button, GTK_STOCK_CANCEL,
                                      &ok_button, GTK_STOCK_OK,
index 81ddec9c00be563bcdb45b3da499a48cee096497..87abbad05a1c28ecddc472ac2461c100df99c5c7 100644 (file)
@@ -218,7 +218,7 @@ gint menu_find_option_menu_index(GtkCMOptionMenu *optmenu, gpointer data,
        gpointer menu_data;
        GList *children;
        GList *cur;
        gpointer menu_data;
        GList *children;
        GList *cur;
-       gint n;
+       gint n, found = -1;
 
        menu = gtk_cmoption_menu_get_menu(optmenu);
        children = gtk_container_get_children(GTK_CONTAINER(GTK_MENU_SHELL(menu)));
 
        menu = gtk_cmoption_menu_get_menu(optmenu);
        children = gtk_container_get_children(GTK_CONTAINER(GTK_MENU_SHELL(menu)));
@@ -229,14 +229,18 @@ gint menu_find_option_menu_index(GtkCMOptionMenu *optmenu, gpointer data,
                menu_data = g_object_get_data(G_OBJECT(menuitem),
                                              MENU_VAL_ID);
                if (func) {
                menu_data = g_object_get_data(G_OBJECT(menuitem),
                                              MENU_VAL_ID);
                if (func) {
-                       if (func(menu_data, data) == 0)
-                               return n;
-               } else if (menu_data == data)
-                       return n;
+                       if (func(menu_data, data) == 0) {
+                               found = n;
+                               break;
+                       }
+               } else if (menu_data == data) {
+                       found = n;
+                       break;
+               }
        }
 
        g_list_free(children);
 
        }
 
        g_list_free(children);
 
-       return -1;
+       return found;
 }
 #endif
 }
 #endif
index 52ebc1a3f1452b2d0ed979ea86e84b8f676e70de..4cd6e6f37db28ff7f109acbb0286917d0b9ce6a0 100644 (file)
@@ -1075,25 +1075,23 @@ void quicksearch_set_search_strings(QuickSearch *quicksearch)
                                        g_list_append(
                                                quicksearch->normal_search_strings,
                                                g_strdup(strings->data));
                                        g_list_append(
                                                quicksearch->normal_search_strings,
                                                g_strdup(strings->data));
-                               g_free(newstr);
-                               continue;
-                       }
-                       
-                       matcher_list = matcher_parser_get_cond(newstr, FALSE);
-                       g_free(newstr);
+                       } else {
+                               matcher_list = matcher_parser_get_cond(newstr, FALSE);
                        
                        
-                       if (matcher_list) {
-                               quicksearch->extended_search_strings =
-                                       g_list_prepend(
-                                               quicksearch->extended_search_strings,
-                                               g_strdup(strings->data));
-                               matcherlist_free(matcher_list);
-                       } else
-                               quicksearch->normal_search_strings =
-                                       g_list_prepend(
-                                               quicksearch->normal_search_strings,
-                                               g_strdup(strings->data));
+                               if (matcher_list) {
+                                       quicksearch->extended_search_strings =
+                                               g_list_prepend(
+                                                       quicksearch->extended_search_strings,
+                                                       g_strdup(strings->data));
+                                       matcherlist_free(matcher_list);
+                               } else
+                                       quicksearch->normal_search_strings =
+                                               g_list_prepend(
+                                                       quicksearch->normal_search_strings,
+                                                       g_strdup(strings->data));
+                       }
                }
                }
+               g_free(newstr);
        
        } while ((strings = g_list_next(strings)) != NULL);
 
        
        } while ((strings = g_list_next(strings)) != NULL);
 
index d7b39dbc06090dfd3902e00271336555612a2113..8e584d21a9edf206828fc580e3d973e992567e9b 100644 (file)
@@ -769,6 +769,8 @@ static void imap_folder_destroy(Folder *folder)
        while (imap_folder_get_refcnt(folder) > 0)
                gtk_main_iteration();
        
        while (imap_folder_get_refcnt(folder) > 0)
                gtk_main_iteration();
        
+       g_free(IMAP_FOLDER(folder)->search_charset);
+
        folder_remote_folder_destroy(REMOTE_FOLDER(folder));
        imap_done(folder);
 }
        folder_remote_folder_destroy(REMOTE_FOLDER(folder));
        imap_done(folder);
 }
@@ -1579,8 +1581,10 @@ static gboolean imap_is_msg_fully_cached(Folder *folder, FolderItem *item, gint
                return TRUE;
        }
        path = folder_item_get_path(item);
                return TRUE;
        }
        path = folder_item_get_path(item);
-       if (!is_dir_exist(path))
+       if (!is_dir_exist(path)) {
+               g_free(path);
                return FALSE;
                return FALSE;
+       }
 
        filename = g_strconcat(path, G_DIR_SEPARATOR_S, itos(uid), NULL);
        g_free(path);
 
        filename = g_strconcat(path, G_DIR_SEPARATOR_S, itos(uid), NULL);
        g_free(path);
@@ -2351,7 +2355,10 @@ static gint      search_msgs             (Folder                 *folder,
                        *msgs = g_slist_prepend(*msgs, GUINT_TO_POINTER(((MsgInfo*) cur->data)->msgnum));
                        count++;
                }
                        *msgs = g_slist_prepend(*msgs, GUINT_TO_POINTER(((MsgInfo*) cur->data)->msgnum));
                        count++;
                }
+               procmsg_msg_list_free(list);
+
                *msgs = g_slist_reverse(*msgs);
                *msgs = g_slist_reverse(*msgs);
+
                return count;
        }
 
                return count;
        }
 
@@ -3499,12 +3506,7 @@ static void *imap_get_uncached_messages_thread(void *data)
                main_window_reflect_tags_changes(mainwindow_get_mainwindow());
        }
 
                main_window_reflect_tags_changes(mainwindow_get_mainwindow());
        }
 
-       for (cur = seq_list; cur != NULL; cur = g_slist_next(cur)) {
-               struct mailimap_set * imapset;
-               
-               imapset = cur->data;
-               mailimap_set_free(imapset);
-       }
+       imap_lep_set_free(seq_list);
        
        session_set_access_time(SESSION(session));
        stuff->done = TRUE;
        
        session_set_access_time(SESSION(session));
        stuff->done = TRUE;
index be6a0030b6f767fa5b6e3cde794e9a2097a3cef1..0b62821bd1be8b463b7f60a01565a3e8b6a01141 100644 (file)
@@ -643,6 +643,8 @@ static void sc_session_manager_connect(MainWindow *mainwin)
                        vals[0].length = strlen(g_get_user_name()?g_get_user_name():"");
                        vals[0].value = g_strdup(g_get_user_name()?g_get_user_name():"");
                        sc_client_set_value (mainwin, SmUserID, SmARRAY8, 1, vals);
                        vals[0].length = strlen(g_get_user_name()?g_get_user_name():"");
                        vals[0].value = g_strdup(g_get_user_name()?g_get_user_name():"");
                        sc_client_set_value (mainwin, SmUserID, SmARRAY8, 1, vals);
+
+                       g_free(vals);
                }
        }
 }
                }
        }
 }
@@ -2132,7 +2134,7 @@ gboolean claws_is_starting(void)
 gchar *claws_get_socket_name(void)
 {
        static gchar *filename = NULL;
 gchar *claws_get_socket_name(void)
 {
        static gchar *filename = NULL;
-       const gchar *socket_dir = NULL;
+       gchar *socket_dir = NULL;
        gchar md5sum[33];
 
        if (filename == NULL) {
        gchar md5sum[33];
 
        if (filename == NULL) {
index 95f93e468f56d0a36a62d0eeb1ab27f29cf4b874..919626a74987ef174e7f307f4b5f0e2541914021 100644 (file)
@@ -1145,6 +1145,7 @@ void mainwin_accel_changed_cb (GtkAccelGroup *accelgroup, guint keyval, GdkModif
                        g_free(new_accel);
                }
        }
                        g_free(new_accel);
                }
        }
+       g_list_free(closures);
 }
 
 static void mainwindow_colorlabel_menu_create(MainWindow *mainwin, gboolean refresh)
 }
 
 static void mainwindow_colorlabel_menu_create(MainWindow *mainwin, gboolean refresh)
index caec7d99b44108da3a622d2b64b6f5aa7743de8e..37f382820e680b238b93f13c2ebe7b8113ca2a1e 100644 (file)
@@ -2535,19 +2535,22 @@ static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo)
                          to_human_readable((goffset)mimeinfo->length), NULL);
        g_free(content_type);
        if (desc && *desc) {
                          to_human_readable((goffset)mimeinfo->length), NULL);
        g_free(content_type);
        if (desc && *desc) {
-               gchar *tmp = NULL;
+               gchar *tmp = NULL, *escaped = NULL;
                if (!g_utf8_validate(desc, -1, NULL)) {
                        tmp = conv_filename_to_utf8(desc);
                } else {
                        tmp = g_strdup(desc);
                }
                if (!g_utf8_validate(desc, -1, NULL)) {
                        tmp = conv_filename_to_utf8(desc);
                } else {
                        tmp = g_strdup(desc);
                }
+               escaped = g_markup_escape_text(tmp,-1);
+               
                tiptmp = g_strconcat(tip, "\n<b>",
                                prefs_common.attach_desc && mimeinfo->description ?
                                _("Description:") : _("Filename:"),
                tiptmp = g_strconcat(tip, "\n<b>",
                                prefs_common.attach_desc && mimeinfo->description ?
                                _("Description:") : _("Filename:"),
-                               " </b>", g_markup_escape_text(tmp,-1), NULL);
+                               " </b>", escaped, NULL);
                g_free(tip);
                tip = tiptmp;
                g_free(tmp);
                g_free(tip);
                tip = tiptmp;
                g_free(tmp);
+               g_free(escaped);
        }
        if (sigshort && *sigshort) {
                tiptmp = g_strjoin("\n", tip, g_markup_escape_text(sigshort, -1), NULL);
        }
        if (sigshort && *sigshort) {
                tiptmp = g_strjoin("\n", tip, g_markup_escape_text(sigshort, -1), NULL);
@@ -2649,10 +2652,10 @@ static void icon_list_create(MimeView *mimeview, MimeInfo *mimeinfo)
 static void icon_list_toggle_by_mime_info (MimeView    *mimeview,
                                           MimeInfo     *mimeinfo)
 {
 static void icon_list_toggle_by_mime_info (MimeView    *mimeview,
                                           MimeInfo     *mimeinfo)
 {
-       GList *child;
+       GList *children, *child;
        
        
-       child = gtk_container_get_children(GTK_CONTAINER(mimeview->icon_vbox));
-       for (; child != NULL; child = g_list_next(child)) {
+       children = gtk_container_get_children(GTK_CONTAINER(mimeview->icon_vbox));
+       for (child = children; child != NULL; child = g_list_next(child)) {
                if (!GTK_IS_EVENT_BOX(child->data))
                        continue;
                if(g_object_get_data(G_OBJECT(child->data),
                if (!GTK_IS_EVENT_BOX(child->data))
                        continue;
                if(g_object_get_data(G_OBJECT(child->data),
@@ -2670,6 +2673,7 @@ static void icon_list_toggle_by_mime_info (MimeView       *mimeview,
                        gtk_widget_queue_draw(icon);
                }                        
        }
                        gtk_widget_queue_draw(icon);
                }                        
        }
+       g_list_free(children);
 }
 
 static void ctree_size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation,
 }
 
 static void ctree_size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation,
index e3aa20bbd7f41e631782b617d7775c632004c31d..d539f352e9ea3ff0c68baaf3b486571fb8bade26 100644 (file)
@@ -920,19 +920,6 @@ static void prefs_account_edit_custom_header       (void);
  * system choice. */
 static void privacy_system_activated(GtkWidget *combobox)
 {
  * system choice. */
 static void privacy_system_activated(GtkWidget *combobox)
 {
-       const gchar *system_id;
-       gint privacy_enabled_int;
-       GtkTreeIter iter;
-       GtkListStore *menu = GTK_LIST_STORE(gtk_combo_box_get_model(
-                               GTK_COMBO_BOX(combobox)));
-
-       gtk_combo_box_get_active_iter(GTK_COMBO_BOX(combobox), &iter);
-
-       gtk_tree_model_get(GTK_TREE_MODEL(menu), &iter,
-                       COMBOBOX_PRIVACY_PLUGIN_ID, &system_id,
-                       COMBOBOX_DATA, &privacy_enabled_int,
-                       -1);
-       
        gtk_widget_set_sensitive (privacy_page.save_clear_text_checkbtn, 
                !gtk_toggle_button_get_active(
                                GTK_TOGGLE_BUTTON(privacy_page.encrypt_to_self_checkbtn)));
        gtk_widget_set_sensitive (privacy_page.save_clear_text_checkbtn, 
                !gtk_toggle_button_get_active(
                                GTK_TOGGLE_BUTTON(privacy_page.encrypt_to_self_checkbtn)));
@@ -2657,6 +2644,7 @@ static void advanced_create_widget_func(PrefsPage * _page,
        GtkWidget *trash_folder_entry;
        GtkWidget *imap_use_trash_checkbtn;
        GtkSizeGroup *size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
        GtkWidget *trash_folder_entry;
        GtkWidget *imap_use_trash_checkbtn;
        GtkSizeGroup *size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+
 #define PACK_HBOX(hbox) \
        { \
        hbox = gtk_hbox_new (FALSE, 8); \
 #define PACK_HBOX(hbox) \
        { \
        hbox = gtk_hbox_new (FALSE, 8); \
@@ -2845,6 +2833,8 @@ static void advanced_create_widget_func(PrefsPage * _page,
        page->vbox = vbox1;
 
        page->page.widget = vbox1;
        page->vbox = vbox1;
 
        page->page.widget = vbox1;
+       
+       g_object_unref(G_OBJECT(size_group));
 }
        
 static gint prefs_basic_apply(void)
 }
        
 static gint prefs_basic_apply(void)
index 6c69fba9d56271a369fc9aa6a67e519b373934e4..480de3394ead74aaf068e219dee0f951c091f79b 100644 (file)
@@ -406,7 +406,7 @@ static void prefs_themes_free_names(ThemesData *tdata)
                
                names = g_list_next(names);
        }
                
                names = g_list_next(names);
        }
-       g_list_free(names);
+       g_list_free(tdata->names);
        tdata->names = NULL;
 }
 
        tdata->names = NULL;
 }
 
index d8c9450ed545d5d9dd72707b6d7e45df544edb5c..22fb57695bfb3350560bcfbe1b5caab76de57c01 100644 (file)
@@ -257,6 +257,8 @@ void quotefmt_create_new_msg_fmt_widgets(GtkWindow *parent_window,
                *override_from_format = entry_from;
        *edit_subject_format = entry_subject;
        *edit_body_format = text_format;
                *override_from_format = entry_from;
        *edit_subject_format = entry_subject;
        *edit_body_format = text_format;
+
+       g_object_unref(G_OBJECT(size_group));
 }
 
 void quotefmt_create_reply_fmt_widgets(GtkWindow *parent_window,
 }
 
 void quotefmt_create_reply_fmt_widgets(GtkWindow *parent_window,
@@ -385,6 +387,8 @@ void quotefmt_create_reply_fmt_widgets(GtkWindow *parent_window,
        if (override_from_format)
                *override_from_format = entry_from;
        *edit_reply_format = text_quotefmt;
        if (override_from_format)
                *override_from_format = entry_from;
        *edit_reply_format = text_quotefmt;
+
+       g_object_unref(G_OBJECT(size_group));
 }
 
 void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
 }
 
 void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
@@ -515,6 +519,8 @@ void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
        if (override_from_format)
                *override_from_format = entry_from;
        *edit_fw_format = text_fw_quotefmt;
        if (override_from_format)
                *override_from_format = entry_from;
        *edit_fw_format = text_fw_quotefmt;
+       
+       g_object_unref(G_OBJECT(size_group));
 }
 
 void quotefmt_add_info_button(GtkWindow *parent_window, GtkWidget *parent_box)
 }
 
 void quotefmt_add_info_button(GtkWindow *parent_window, GtkWidget *parent_box)