From: Colin Leroy Date: Sun, 18 May 2008 16:27:59 +0000 (+0000) Subject: 2008-05-18 [colin] 3.4.0cvs51 X-Git-Tag: rel_3_5_0~68 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=e11caf622eba45a1561f480f1a6766b2a6aa1c37 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. --- diff --git a/ChangeLog b/ChangeLog index 474a997bc..69df9186d 100644 --- 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 diff --git a/PATCHSETS b/PATCHSETS index e526b91e5..c0e6f8285 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -3346,3 +3346,4 @@ ( 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 diff --git a/configure.ac b/configure.ac index 03398c396..169b88fd8 100644 --- a/configure.ac +++ b/configure.ac @@ -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= diff --git a/src/common/plugin.c b/src/common/plugin.c index 8fa623f6c..b1983c125 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -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); diff --git a/src/etpan/imap-thread.c b/src/etpan/imap-thread.c index 3a8bc0837..6c8651344 100644 --- a/src/etpan/imap-thread.c +++ b/src/etpan/imap-thread.c @@ -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; diff --git a/src/etpan/nntp-thread.c b/src/etpan/nntp-thread.c index 4945ba069..d20ac0442 100644 --- a/src/etpan/nntp-thread.c +++ b/src/etpan/nntp-thread.c @@ -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(); diff --git a/src/gtk/gtksctree.c b/src/gtk/gtksctree.c index 85f19d2e0..c1aaa3980 100644 --- a/src/gtk/gtksctree.c +++ b/src/gtk/gtksctree.c @@ -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 */