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 474a997..69df918 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
index e526b91..c0e6f82 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.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 03398c3..169b88f 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=50
+EXTRA_VERSION=51
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 8fa623f..b1983c1 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);
+                               fclose(fp);
                                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_file_close(pfile);
                return;
        }
        g_free(block);
index 3a8bc08..6c86513 100644 (file)
@@ -287,6 +287,7 @@ void imap_main_set_timeout(int sec)
 
 void imap_main_done(void)
 {
+       imap_disconnect_all();
        etpan_thread_manager_stop(thread_manager);
 #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
        return;
index 4945ba0..d20ac04 100644 (file)
@@ -47,7 +47,6 @@
 #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;
@@ -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);
-       courier_workaround_hash = chash_new(CHASH_COPYKEY, CHASH_DEFAULTSIZE);
        
        thread_manager = etpan_thread_manager_new();
        
index 85f19d2..c1aaa39 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)
 {
+       GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
        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;
+       
+       gobject_class->finalize = gtk_sctree_finalize;
 }
 
 /* Standard object initialization function */