summaryrefslogtreecommitdiff
path: root/mailbox/rfc2047.c
diff options
context:
space:
mode:
Diffstat (limited to 'mailbox/rfc2047.c')
-rw-r--r--mailbox/rfc2047.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mailbox/rfc2047.c b/mailbox/rfc2047.c
index 06d94c295..f930700cb 100644
--- a/mailbox/rfc2047.c
+++ b/mailbox/rfc2047.c
@@ -165,6 +165,7 @@ mu_rfc2047_decode (const char *tocode, const char *input, char **ptostr)
mu_stream_seek (in_stream, 0, MU_SEEK_SET, NULL);
status = mu_decode_filter (&filter, in_stream, filter_type, fromcode,
tocode);
+ mu_stream_unref (in_stream);
if (status != 0)
break;
@@ -269,7 +270,8 @@ mu_rfc2047_encode (const char *charset, const char *encoding,
mu_stream_write (input_stream, text, strlen (text), NULL);
mu_stream_seek (input_stream, 0, MU_SEEK_SET, NULL);
rc = mu_filter_create (&output_stream, input_stream,
- encoding, MU_FILTER_ENCODE, MU_STREAM_READ);
+ encoding, MU_FILTER_ENCODE,
+ MU_STREAM_READ | MU_STREAM_AUTOCLOSE);
if (rc == 0)
{
/* Assume strlen(qp_encoded_text) <= strlen(text) * 3 */

Return to:

Send suggestions and report system problems to the System administrator.