From 1eb6dc987a1e46ee36211d0417c152e14986f32a Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Wed, 26 Sep 2001 23:44:10 +0000 Subject: strdup our "This message contains invalid recipients" string, since it 2001-09-26 Jon Trowbridge * mail-callbacks.c (composer_get_message): strdup our "This message contains invalid recipients" string, since it gets freed later. And then don't leak the message string. (Bug #10877) svn path=/trunk/; revision=13175 --- mail/ChangeLog | 4 ++++ mail/mail-callbacks.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 780e1c5a81..6c2ad2b6a5 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,9 @@ 2001-09-26 Jon Trowbridge + * mail-callbacks.c (composer_get_message): strdup our "This + message contains invalid recipients" string, since it gets freed + later. And then don't leak the message string. (Bug #10877) + * mail-format.c (write_address): Use camel_address_format, not camel_address_encode. diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index ee68f9f5c5..449b21f35c 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -416,7 +416,7 @@ composer_get_message (EMsgComposer *composer) } if (have_invalid) { - msg = _("This message contains invalid recipients:"); + msg = g_strdup (_("This message contains invalid recipients:")); for (i = 0; recipients[i]; ++i) { if (!e_destination_is_valid (recipients[i])) { new_msg = g_strdup_printf ("%s\n %s", msg, @@ -431,6 +431,7 @@ composer_get_message (EMsgComposer *composer) msg = new_msg; message_box = gnome_message_box_new (msg, GNOME_MESSAGE_BOX_WARNING, GNOME_STOCK_BUTTON_OK, NULL); + g_free (msg); gnome_dialog_run_and_close (GNOME_DIALOG (message_box)); -- cgit v1.2.3