2005-12-13 [colin] 1.9.100cvs86
authorColin Leroy <colin@colino.net>
Tue, 13 Dec 2005 17:32:23 +0000 (17:32 +0000)
committerColin Leroy <colin@colino.net>
Tue, 13 Dec 2005 17:32:23 +0000 (17:32 +0000)
* src/imap.c
* src/etpan/imap-thread.c
Fix leaks (patch by Hoa)
* src/news.c
* src/common/plugin.c
Fix leaks

ChangeLog
PATCHSETS
configure.ac
src/common/plugin.c
src/etpan/imap-thread.c
src/imap.c
src/news.c

index 14c83ca..6e254d9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-12-13 [colin]     1.9.100cvs86
+
+       * src/imap.c
+       * src/etpan/imap-thread.c
+               Fix leaks (patch by Hoa)
+       * src/news.c
+       * src/common/plugin.c
+               Fix leaks
+
 2005-12-12 [colin]
 
        * 2.0.0-rc2 released
index 313645e..6f1e72f 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.2.4.10 -r 1.2.4.11 src/browseldap.c;  cvs diff -u -r 1.26.2.21 -r 1.26.2.22 src/foldersel.c;  cvs diff -u -r 1.60.2.26 -r 1.60.2.27 src/prefs_actions.c;  cvs diff -u -r 1.59.2.27 -r 1.59.2.28 src/prefs_filtering.c;  cvs diff -u -r 1.43.2.29 -r 1.43.2.30 src/prefs_matcher.c;  cvs diff -u -r -1.2 -r -1.3 src/prefs_spelling.glade;  cvs diff -u -r 1.12.2.18 -r 1.12.2.19 src/prefs_template.c;  cvs diff -u -r -1.1.2.1 -r -1.1.2.2 src/gtk/foldersort.glade;  cvs diff -u -r 1.5.2.20 -r 1.5.2.21 src/gtk/pluginwindow.c;  cvs diff -u -r -1.1 -r -1.2 src/gtk/pluginwindow.glade;  cvs diff -u -r -1.2.2.1 -r -1.2.2.2 src/plugins/spamassassin/spamassassin_gtk.glade;  ) > 1.9.100cvs83.patchset
 ( cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/gtk/icon_legend.c;  ) > 1.9.100cvs84.patchset
 ( cvs diff -u -r 1.75.2.14 -r 1.75.2.15 src/matcher.c;  ) > 1.9.100cvs85.patchset
+( cvs diff -u -r 1.179.2.83 -r 1.179.2.84 src/imap.c;  cvs diff -u -r 1.101.2.18 -r 1.101.2.19 src/news.c;  cvs diff -u -r 1.13.2.10 -r 1.13.2.11 src/common/plugin.c;  cvs diff -u -r 1.1.4.25 -r 1.1.4.26 src/etpan/imap-thread.c;  ) > 1.9.100cvs86.patchset
index 9ceddd9..0b37231 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=85
+EXTRA_VERSION=86
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 34d4115..fe46b57 100644 (file)
@@ -149,6 +149,7 @@ static gint plugin_load_deps(const gchar *filename, gchar **error)
                                return -1;
                        }
                }
+               g_free(path);
                if (!g_slist_find_custom(dep_plugin->rdeps, 
                                (gpointer) filename, list_find_by_string)) {
                        debug_print("adding %s to %s rdeps\n",
index d89d83d..76e3a10 100644 (file)
@@ -614,6 +614,8 @@ int imap_threaded_status(Folder * folder, const char * mb,
        
        * data_status = result.data_status;
        
+       mailimap_status_att_list_free(status_att_list);
+       
        return result.error;
 }
 
index 1032586..48ddf08 100644 (file)
@@ -2034,6 +2034,13 @@ static void *imap_get_uncached_messages_thread(void *data)
                imap_fetch_env_free(env_list);
        }
        
+       for (cur = seq_list; cur != NULL; cur = g_slist_next(cur)) {
+               struct mailimap_set * imapset;
+               
+               imapset = cur->data;
+               mailimap_set_free(imapset);
+       }
+       
        session_set_access_time(SESSION(session));
        stuff->done = TRUE;
        return newlist;
@@ -2669,6 +2676,7 @@ static gint imap_cmd_append(IMAPSession *session, const gchar *destfolder,
        flag_list = imap_flag_to_lep(flags);
        r = imap_threaded_append(session->folder, destfolder,
                         file, flag_list);
+       mailimap_flag_list_free(flag_list);
        if (new_uid != NULL)
                *new_uid = 0;
 
@@ -2714,6 +2722,7 @@ static gint imap_cmd_store(IMAPSession *session, struct mailimap_set * set,
                        mailimap_store_att_flags_new_remove_flags_silent(flag_list);
        
        r = imap_threaded_store(session->folder, set, store_att_flags);
+       mailimap_store_att_flags_free(store_att_flags);
        if (r != MAILIMAP_NO_ERROR) {
                
                return IMAP_ERROR;
@@ -3004,11 +3013,15 @@ static void *get_list_of_uids_thread(void *data)
 
        r = imap_threaded_search(folder, IMAP_SEARCH_TYPE_SIMPLE, set,
                                 &lep_uidlist);
+       mailimap_set_free(set);
+       
        if (r == MAILIMAP_NO_ERROR) {
                GSList * fetchuid_list;
                
                fetchuid_list =
                        imap_uid_list_from_lep(lep_uidlist);
+               mailimap_search_result_free(lep_uidlist);
+               
                uidlist = g_slist_concat(fetchuid_list, uidlist);
        }
        else {
@@ -3020,6 +3033,7 @@ static void *get_list_of_uids_thread(void *data)
                if (r == MAILIMAP_NO_ERROR) {
                        fetchuid_list =
                                imap_uid_list_from_lep_tab(lep_uidtab);
+                       imap_fetch_uid_list_free(lep_uidtab);
                        uidlist = g_slist_concat(fetchuid_list, uidlist);
                }
        }
@@ -3828,12 +3842,12 @@ static void process_hashtable(IMAPFolderItem *item)
 {
        if (item->flags_set_table) {
                g_hash_table_foreach_remove(item->flags_set_table, process_flags, GINT_TO_POINTER(TRUE));
-               g_free(item->flags_set_table);
+               g_hash_table_destroy(item->flags_set_table);
                item->flags_set_table = NULL;
        }
        if (item->flags_unset_table) {
                g_hash_table_foreach_remove(item->flags_unset_table, process_flags, GINT_TO_POINTER(FALSE));
-               g_free(item->flags_unset_table);
+               g_hash_table_destroy(item->flags_unset_table);
                item->flags_unset_table = NULL;
        }
 }
index 0160a43..de350c2 100644 (file)
@@ -701,7 +701,7 @@ static MsgInfo *news_parse_xover(const gchar *xover_str)
                while (ref_tokens[i]) {
                        gchar *cur_ref = ref_tokens[i];
                        msginfo->references = references_list_append(msginfo->references, 
-                                       g_strdup(cur_ref));
+                                       cur_ref);
                        i++;
                }
                g_strfreev(ref_tokens);