aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-02-11 15:00:07 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-02-11 15:00:07 +0800
commit7004fae0eb1b4227bfb611a1d876198bbb73d810 (patch)
treef9cfc10bda326625619fc9c2f905415997cbf5b2 /mail/mail-callbacks.c
parent63b02f6746738a1077b1cde9b324712e661f6966 (diff)
downloadgsoc2013-evolution-7004fae0eb1b4227bfb611a1d876198bbb73d810.tar
gsoc2013-evolution-7004fae0eb1b4227bfb611a1d876198bbb73d810.tar.gz
gsoc2013-evolution-7004fae0eb1b4227bfb611a1d876198bbb73d810.tar.bz2
gsoc2013-evolution-7004fae0eb1b4227bfb611a1d876198bbb73d810.tar.lz
gsoc2013-evolution-7004fae0eb1b4227bfb611a1d876198bbb73d810.tar.xz
gsoc2013-evolution-7004fae0eb1b4227bfb611a1d876198bbb73d810.tar.zst
gsoc2013-evolution-7004fae0eb1b4227bfb611a1d876198bbb73d810.zip
Don't leak memory. (forward_messages): change doinline to be a gboolean
2001-02-11 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (forward_inlined): Don't leak memory. (forward_messages): change doinline to be a gboolean argument. svn path=/trunk/; revision=8172
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 5546e85b60..aba7bee2ac 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -753,8 +753,8 @@ do_forward_attach(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part,
}
}
-void
-forward_messages(CamelFolder *folder, GPtrArray *uids, int doinline)
+static void
+forward_messages (CamelFolder *folder, GPtrArray *uids, gboolean doinline)
{
if (doinline && uids->len == 1) {
mail_get_message(folder, uids->pdata[0], do_forward_inline, NULL, mail_thread_new);
@@ -766,15 +766,17 @@ forward_messages(CamelFolder *folder, GPtrArray *uids, int doinline)
void
forward_inlined (GtkWidget *widget, gpointer user_data)
{
+ FolderBrowser *fb = FOLDER_BROWSER (user_data);
GPtrArray *uids;
- FolderBrowser *fb = (FolderBrowser *)user_data;
-
+
if (!check_send_configuration (fb))
return;
-
- uids = g_ptr_array_new();
- g_ptr_array_add(uids, g_strdup (fb->message_list->cursor_uid));
- forward_messages(fb->message_list->folder, uids, TRUE);
+
+ uids = g_ptr_array_new ();
+ g_ptr_array_add (uids, g_strdup (fb->message_list->cursor_uid));
+ forward_messages (fb->message_list->folder, uids, TRUE);
+ g_free (uids->pdata[0]);
+ g_ptr_array_free (uids, TRUE);
}
void