aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-11-07 09:19:27 +0800
committerPeter Williams <peterw@src.gnome.org>2000-11-07 09:19:27 +0800
commit66b85f364e12a4c94faccb08906b48a9ac1452f5 (patch)
treebb28b0edcc699d3e7ae4397cd42775212eccbd23 /composer
parent1359e56e8435dfbce8dc5c5bfc7a3d3b65e4e3e1 (diff)
downloadgsoc2013-evolution-66b85f364e12a4c94faccb08906b48a9ac1452f5.tar
gsoc2013-evolution-66b85f364e12a4c94faccb08906b48a9ac1452f5.tar.gz
gsoc2013-evolution-66b85f364e12a4c94faccb08906b48a9ac1452f5.tar.bz2
gsoc2013-evolution-66b85f364e12a4c94faccb08906b48a9ac1452f5.tar.lz
gsoc2013-evolution-66b85f364e12a4c94faccb08906b48a9ac1452f5.tar.xz
gsoc2013-evolution-66b85f364e12a4c94faccb08906b48a9ac1452f5.tar.zst
gsoc2013-evolution-66b85f364e12a4c94faccb08906b48a9ac1452f5.zip
Two segfault fixes
svn path=/trunk/; revision=6472
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog6
-rw-r--r--composer/e-msg-composer-attachment-bar.c3
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);