diff options
author | Kjartan Maraas <kmaraas@gnome.org> | 2005-07-13 18:37:16 +0800 |
---|---|---|
committer | Kjartan Maraas <kmaraas@src.gnome.org> | 2005-07-13 18:37:16 +0800 |
commit | bb714f46f72ea07579da4d988a08fa33eb8edb1e (patch) | |
tree | e3a966e00c8d09275a994a9b7b75a758f3cdc7af /composer | |
parent | 4afc6e2f2a877441d36c670ef58fe31360a83e63 (diff) | |
download | gsoc2013-evolution-bb714f46f72ea07579da4d988a08fa33eb8edb1e.tar.gz gsoc2013-evolution-bb714f46f72ea07579da4d988a08fa33eb8edb1e.tar.zst gsoc2013-evolution-bb714f46f72ea07579da4d988a08fa33eb8edb1e.zip |
Don't leak the file name here.
2005-07-13 Kjartan Maraas <kmaraas@gnome.org>
* e-msg-composer-select-file.c: (select_attach_response): Don't
leak the file name here.
svn path=/trunk/; revision=29757
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 7 | ||||
-rw-r--r-- | composer/e-msg-composer-select-file.c | 5 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 432a9e25aa..dc9ee8f53d 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,9 @@ +2005-07-13 Kjartan Maraas <kmaraas@gnome.org> + + * e-msg-composer-select-file.c: (select_attach_response): Don't + leak the file name here. + * e-msg-composer.c: (build_message): Don't allocate charset twice. + 2005-07-13 Tor Lillqvist <tml@novell.com> * Makefile.am (INCLUDES): There are no camel or @@ -15,6 +21,7 @@ Changed the code to use e_attachment_* from em_attachment* * e-msg-composer.h: Added removed old header includes + 2005-07-10 Shreyas Srinivasan <sshreyas@novell.com> * e-msg-composer-hdrs.c: Take into account store diff --git a/composer/e-msg-composer-select-file.c b/composer/e-msg-composer-select-file.c index 7329d570c5..7a4b917f24 100644 --- a/composer/e-msg-composer-select-file.c +++ b/composer/e-msg-composer-select-file.c @@ -194,8 +194,11 @@ select_attach_response(GtkWidget *selector, guint response, struct _EMsgComposer char *path; #ifdef USE_GTKFILECHOOSER + char *filename; names = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (selector)); - path = g_path_get_dirname (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (selector))); + filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (selector)); + path = g_path_get_dirname (filename); + g_free (filename); #else char **files; int i; diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 45bc84d4bc..e68384c3aa 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -492,7 +492,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data) } /* FIXME: we may want to do better than this... */ - charset = best_charset (data, composer->charset, &plain_encoding); + type = camel_content_type_new ("text", "plain"); if ((charset = best_charset (data, composer->charset, &plain_encoding))) { camel_content_type_set_param (type, "charset", charset); |