aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Loper <mloper@src.gnome.org>2000-08-17 22:19:02 +0800
committerMatthew Loper <mloper@src.gnome.org>2000-08-17 22:19:02 +0800
commit24feba20337274a86d51700fa0e8f56ce378c902 (patch)
tree78effe172324ffdb993888b9a3d7345d7ec209b3 /mail
parent1cb1a157cb489f3b8dd49bed81bad7c9dec33f7e (diff)
downloadgsoc2013-evolution-24feba20337274a86d51700fa0e8f56ce378c902.tar.gz
gsoc2013-evolution-24feba20337274a86d51700fa0e8f56ce378c902.tar.zst
gsoc2013-evolution-24feba20337274a86d51700fa0e8f56ce378c902.zip
Whole buncha leak fixes thanks to Purify
svn path=/trunk/; revision=4862
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog13
-rw-r--r--mail/folder-browser.c3
-rw-r--r--mail/mail-display.c5
-rw-r--r--mail/mail-local.c1
-rw-r--r--mail/mail-ops.c4
-rw-r--r--mail/mail-threads.c7
-rw-r--r--mail/message-list.c3
-rw-r--r--mail/session.c8
8 files changed, 36 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index efa7669577..0bb4298961 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -21,6 +21,19 @@
* mail-format.c (get_url_for_icon): Copy the url_path so that
it can't get freed under us.
+ * mail-threads.c (mail_operation_queue): Fix a leak.
+
+ * mail-ops.c (mail_do_display_message): Fix another leak.
+
+ * message-list.c (message_list_destroy): Remove the seen_id timeout
+ if necessary.
+
+ * mail-local.c (mail_tool_local_uri_to_folder): Fix a leak.
+
+ * session.c (auth_callback): Fix a leak. Almost seems as if
+ I've been using Purify...
+
+
2000-08-15 Peter Williams <peterw@helixcode.com>
* message-thread.c (alloc_container): Add support for debugging
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 522a6b1804..4707351f8c 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -57,6 +57,9 @@ folder_browser_destroy (GtkObject *object)
if (folder_browser->message_list)
bonobo_object_unref (BONOBO_OBJECT (folder_browser->message_list));
+ if (folder_browser->mail_display)
+ gtk_widget_destroy (GTK_WIDGET (folder_browser->mail_display));
+
folder_browser_parent_class->destroy (object);
}
diff --git a/mail/mail-display.c b/mail/mail-display.c
index a24d258511..760c45c92e 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -505,7 +505,10 @@ mail_display_init (GtkObject *object)
static void
mail_display_destroy (GtkObject *object)
{
- /* MailDisplay *mail_display = MAIL_DISPLAY (object); */
+ MailDisplay *mail_display = MAIL_DISPLAY (object);
+
+ g_datalist_clear (mail_display->data);
+ g_free (mail_display->data);
mail_display_parent_class->destroy (object);
}
diff --git a/mail/mail-local.c b/mail/mail-local.c
index 7548d32e8b..eb03db0dd4 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -200,6 +200,7 @@ mail_tool_local_uri_to_folder(const char *uri, CamelException *ex)
folder = mail_tool_get_folder_from_urlname (storename, meta->name, FALSE, ex);
camel_url_free(url);
+ g_free (storename);
free_metainfo(meta);
return folder;
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 1a3ff0efe3..f90d492dd8 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1515,7 +1515,7 @@ typedef struct display_message_input_s
{
MessageList *ml;
gchar *uid;
- gint (*timeout) (gpointer);
+ gint (*timeout) (gpointer);
}
display_message_input_t;
@@ -1646,7 +1646,7 @@ mail_do_display_message (MessageList *ml, const char *uid,
input->uid = g_strdup (uid);
input->timeout = timeout;
- mail_operation_queue (&op_display_message, input, FALSE);
+ mail_operation_queue (&op_display_message, input, TRUE);
}
/* ** EDIT MESSAGES ******************************************************* */
diff --git a/mail/mail-threads.c b/mail/mail-threads.c
index cf3528dfb1..8fe170eea2 100644
--- a/mail/mail-threads.c
+++ b/mail/mail-threads.c
@@ -300,6 +300,11 @@ mail_operation_queue (const mail_operation_spec * spec, gpointer input,
} /* else add self to queue */
write (DISPATCH_WRITER, clur, sizeof (closure_t));
+ /* dispatch allocates a separate buffer
+ * to hold the closure; it's in the pipe and
+ * can safely be freed
+ */
+ g_free (clur);
queue_len++;
return TRUE;
}
@@ -865,7 +870,7 @@ get_password (com_msg_t * msg)
if (button == 1 || *(msg->reply) == NULL) {
*(msg->success) = FALSE;
*(msg->reply) = g_strdup (_("User cancelled query."));
- } else if (button > 0) {
+ } else if (button >= 0) {
*(msg->success) = TRUE;
}
diff --git a/mail/message-list.c b/mail/message-list.c
index c635f3ea84..f9772fa7b0 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -676,6 +676,9 @@ message_list_destroy (GtkObject *object)
if (message_list->idle_id != 0)
g_source_remove(message_list->idle_id);
+ if (message_list->seen_id)
+ gtk_timeout_remove (message_list->seen_id);
+
if (message_list->folder)
camel_object_unref (CAMEL_OBJECT (message_list->folder));
diff --git a/mail/session.c b/mail/session.c
index 161536022e..b76e096abb 100644
--- a/mail/session.c
+++ b/mail/session.c
@@ -66,14 +66,14 @@ static char *
auth_callback (CamelAuthCallbackMode mode, char *data, gboolean secret,
CamelService *service, char *item, CamelException *ex)
{
- char *key, *ans;
+ char *key, *ans, *url;
if (!passwords)
passwords = g_hash_table_new (g_str_hash, g_str_equal);
- key = g_strdup_printf ("%s:%s",
- camel_url_to_string (service->url, FALSE),
- item);
+ url = camel_url_to_string (service->url, FALSE);
+ key = g_strdup_printf ("%s:%s", url, item);
+ g_free (url);
if (mode == CAMEL_AUTHENTICATOR_TELL) {
if (!data) {