summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2017-07-14 15:06:05 +0300
committerSergey Poznyakoff <gray@gnu.org>2017-07-14 15:06:05 +0300
commitdc1a60ad7d95b8d677b7b956ee31d65608e4945e (patch)
tree0259fa7da561b1fa711c72e51188eec8ead461e9
parent7fd25e1edf24dc4ba173b5d05021fd0dbcc2f07c (diff)
downloadmailutils-dc1a60ad7d95b8d677b7b956ee31d65608e4945e.tar.gz
mailutils-dc1a60ad7d95b8d677b7b956ee31d65608e4945e.tar.bz2
Bugfix
* mail/send.c (add_body): Increase reference counter of the copied stream.
-rw-r--r--mail/send.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mail/send.c b/mail/send.c
index cec3990c9..512a90a1d 100644
--- a/mail/send.c
+++ b/mail/send.c
@@ -536,6 +536,8 @@ add_body (mu_message_t inmsg, compose_env_t *env)
aptr->name = NULL;
aptr->filename = NULL;
aptr->source = str;
+ if (str)
+ mu_stream_ref (str);
aptr->skip_empty = skip_empty_attachments || multipart_alternative;
if (!env->attlist)
env->attlist = attlist_new ();

Return to:

Send suggestions and report system problems to the System administrator.