2008-05-18 [colin] 3.4.0cvs51
authorColin Leroy <colin@colino.net>
Sun, 18 May 2008 16:27:59 +0000 (16:27 +0000)
committerColin Leroy <colin@colino.net>
Sun, 18 May 2008 16:27:59 +0000 (16:27 +0000)
* src/common/plugin.c
* src/etpan/imap-thread.c
* src/etpan/nntp-thread.c
* src/gtk/gtksctree.c
Fix bug 1613, 'Various memory leaks';
based on a patch by Didier Barvaux.

ChangeLog
PATCHSETS
configure.ac
src/common/plugin.c
src/etpan/imap-thread.c
src/etpan/nntp-thread.c
src/gtk/gtksctree.c

index 474a997bc74d7a6e279b28189fbe52406a47ff33..69df9186d411150b3642922a36618da819cd6f5d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-05-18 [colin]     3.4.0cvs51
+
+       * src/common/plugin.c
+       * src/etpan/imap-thread.c
+       * src/etpan/nntp-thread.c
+       * src/gtk/gtksctree.c
+               Fix bug 1613, 'Various memory leaks'; 
+               based on a patch by Didier Barvaux.
+
 2008-05-18 [colin]     3.4.0cvs50
 
        * src/mimeview.c
 2008-05-18 [colin]     3.4.0cvs50
 
        * src/mimeview.c
index e526b91e58b1a9e20c7322d2dbedb12599847d76..c0e6f82853e7f206ac7c3751e91acf3deef0e9f7 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.52 -r 1.1.2.53 src/prefs_summaries.c;  cvs diff -u -r 1.395.2.367 -r 1.395.2.368 src/summaryview.c;  ) > 3.4.0cvs48.patchset
 ( cvs diff -u -r 1.25.2.54 -r 1.25.2.55 src/stock_pixmap.c;  ) > 3.4.0cvs49.patchset
 ( cvs diff -u -r 1.83.2.130 -r 1.83.2.131 src/mimeview.c;  cvs diff -u -r 1.10.2.15 -r 1.10.2.16 src/privacy.h;  cvs diff -u -r 1.43.2.98 -r 1.43.2.99 src/toolbar.c;  cvs diff -u -r 1.19.2.26 -r 1.19.2.27 src/toolbar.h;  cvs diff -u -r 1.1.2.49 -r 1.1.2.50 src/plugins/pgpcore/sgpgme.c;  ) > 3.4.0cvs50.patchset
 ( cvs diff -u -r 1.1.2.52 -r 1.1.2.53 src/prefs_summaries.c;  cvs diff -u -r 1.395.2.367 -r 1.395.2.368 src/summaryview.c;  ) > 3.4.0cvs48.patchset
 ( cvs diff -u -r 1.25.2.54 -r 1.25.2.55 src/stock_pixmap.c;  ) > 3.4.0cvs49.patchset
 ( cvs diff -u -r 1.83.2.130 -r 1.83.2.131 src/mimeview.c;  cvs diff -u -r 1.10.2.15 -r 1.10.2.16 src/privacy.h;  cvs diff -u -r 1.43.2.98 -r 1.43.2.99 src/toolbar.c;  cvs diff -u -r 1.19.2.26 -r 1.19.2.27 src/toolbar.h;  cvs diff -u -r 1.1.2.49 -r 1.1.2.50 src/plugins/pgpcore/sgpgme.c;  ) > 3.4.0cvs50.patchset
+( cvs diff -u -r 1.13.2.34 -r 1.13.2.35 src/common/plugin.c;  cvs diff -u -r 1.1.4.100 -r 1.1.4.101 src/etpan/imap-thread.c;  cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/etpan/nntp-thread.c;  cvs diff -u -r 1.1.4.44 -r 1.1.4.45 src/gtk/gtksctree.c;  cvs diff -u -r 1.14.2.62 -r 1.14.2.63 src/plugins/trayicon/trayicon.c;  ) > 3.4.0cvs51.patchset
index 03398c396198d0372bfec1fa94cca821bab8112b..169b88fd845a2773491d2d0571ffde35de64a88f 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=50
+EXTRA_VERSION=51
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 8fa623f6c1665aa5d1850048d1f8eb467479f823..b1983c125dfae81c78391ce0c43dcbfbd0719240 100644 (file)
@@ -214,6 +214,7 @@ static gint plugin_load_deps(const gchar *filename, gchar **error)
                        dep_plugin = plugin_load(path, error);
                        if (dep_plugin == NULL) {
                                g_free(path);
                        dep_plugin = plugin_load(path, error);
                        if (dep_plugin == NULL) {
                                g_free(path);
+                               fclose(fp);
                                return -1;
                        }
                }
                                return -1;
                        }
                }
@@ -463,6 +464,8 @@ void plugin_load_all(const gchar *type)
        if ((pfile = prefs_read_open(rcpath)) == NULL ||
            (prefs_set_block_label(pfile, block) < 0)) {
                g_free(rcpath);
        if ((pfile = prefs_read_open(rcpath)) == NULL ||
            (prefs_set_block_label(pfile, block) < 0)) {
                g_free(rcpath);
+               if (pfile)
+                       prefs_file_close(pfile);
                return;
        }
        g_free(block);
                return;
        }
        g_free(block);
index 3a8bc0837a824b1eae97f8a5f0a19a1ff09d4df1..6c8651344941dcdeda3946b40f95d9ec307577cb 100644 (file)
@@ -287,6 +287,7 @@ void imap_main_set_timeout(int sec)
 
 void imap_main_done(void)
 {
 
 void imap_main_done(void)
 {
+       imap_disconnect_all();
        etpan_thread_manager_stop(thread_manager);
 #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
        return;
        etpan_thread_manager_stop(thread_manager);
 #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
        return;
index 4945ba06977a5e566c1ba3379c6055202cc5564a..d20ac0442dc83be159849e8d3c1aba68ff1a7a55 100644 (file)
@@ -47,7 +47,6 @@
 #define DISABLE_LOG_DURING_LOGIN
 
 static struct etpan_thread_manager * thread_manager = NULL;
 #define DISABLE_LOG_DURING_LOGIN
 
 static struct etpan_thread_manager * thread_manager = NULL;
-static chash * courier_workaround_hash = NULL;
 static chash * nntp_hash = NULL;
 static chash * session_hash = NULL;
 static guint thread_manager_signal = 0;
 static chash * nntp_hash = NULL;
 static chash * session_hash = NULL;
 static guint thread_manager_signal = 0;
@@ -133,7 +132,6 @@ void nntp_main_init(gboolean skip_ssl_cert_check)
        
        nntp_hash = chash_new(CHASH_COPYKEY, CHASH_DEFAULTSIZE);
        session_hash = chash_new(CHASH_COPYKEY, CHASH_DEFAULTSIZE);
        
        nntp_hash = chash_new(CHASH_COPYKEY, CHASH_DEFAULTSIZE);
        session_hash = chash_new(CHASH_COPYKEY, CHASH_DEFAULTSIZE);
-       courier_workaround_hash = chash_new(CHASH_COPYKEY, CHASH_DEFAULTSIZE);
        
        thread_manager = etpan_thread_manager_new();
        
        
        thread_manager = etpan_thread_manager_new();
        
index 85f19d2e05fe0d2a1685bead8307c3e020a6d925..c1aaa39802473394c3bda2968e221366b6d84140 100644 (file)
@@ -1336,10 +1336,19 @@ gtk_sctree_change_focus_row_expansion (GtkCTree          *ctree,
     }
 }
 
     }
 }
 
+static void gtk_sctree_finalize(GObject *object)
+{
+       GtkSCTree *sctree = GTK_SCTREE(object);
+       g_free(sctree->use_markup);
+       sctree->use_markup = NULL;
+       G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
 /* Standard class initialization function */
 static void
 gtk_sctree_class_init (GtkSCTreeClass *klass)
 {
 /* Standard class initialization function */
 static void
 gtk_sctree_class_init (GtkSCTreeClass *klass)
 {
+       GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
        GtkObjectClass *object_class;
        GtkWidgetClass *widget_class;
        GtkCListClass *clist_class;
        GtkObjectClass *object_class;
        GtkWidgetClass *widget_class;
        GtkCListClass *clist_class;
@@ -1409,6 +1418,8 @@ gtk_sctree_class_init (GtkSCTreeClass *klass)
        widget_class->drag_motion = gtk_sctree_drag_motion;
        widget_class->drag_drop = gtk_sctree_drag_drop;
        widget_class->drag_data_received = gtk_sctree_drag_data_received;
        widget_class->drag_motion = gtk_sctree_drag_motion;
        widget_class->drag_drop = gtk_sctree_drag_drop;
        widget_class->drag_data_received = gtk_sctree_drag_data_received;
+       
+       gobject_class->finalize = gtk_sctree_finalize;
 }
 
 /* Standard object initialization function */
 }
 
 /* Standard object initialization function */