diff options
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 6 | ||||
-rw-r--r-- | composer/e-msg-composer-attachment-bar.c | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index a64ac15f41..057fcc3054 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -42,6 +42,12 @@ * Makefile.am: Clean the idl-generated files properly. +2000-11-02 Peter Williams <peterw@helixcode.com> + + * e-msg-composer-attachment-bar.c (attach_to_multipart): CamelStreamMem + steals our byte array; we can't destroy the byte array explicitly, and + we must unref the stream only when done using the array. + 2000-11-01 Jeffrey Stedfast <fejj@helixcode.com> * e-msg-composer.c (e_msg_composer_new_with_message): Don't create diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c index 07debafdd0..1b6d2232a4 100644 --- a/composer/e-msg-composer-attachment-bar.c +++ b/composer/e-msg-composer-attachment-bar.c @@ -706,7 +706,6 @@ attach_to_multipart (CamelMultipart *multipart, array = g_byte_array_new (); stream = camel_stream_mem_new_with_byte_array (array); camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (attachment->body), stream); - camel_object_unref (CAMEL_OBJECT (stream)); g_byte_array_append (array, "", 1); text = array->data; @@ -715,7 +714,7 @@ attach_to_multipart (CamelMultipart *multipart, else camel_mime_part_set_encoding (attachment->body, CAMEL_MIME_PART_ENCODING_7BIT); - g_byte_array_free (array, TRUE); + camel_object_unref (CAMEL_OBJECT (stream)); } else if (g_strcasecmp (content_type->type, "message") != 0) { camel_mime_part_set_encoding (attachment->body, CAMEL_MIME_PART_ENCODING_BASE64); |