From dbbf8dae0bdd56d108f8bfda7614b4a3b895eae2 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Wed, 14 Apr 2010 18:23:42 +0300 Subject: Fix memory leaks in filter and filter_iconv code. * mailbox/filter.c (filter_destroy): Destroy the underlying stream, unless flag is given. (mu_filter_create): Treat last argument as stream flags. * mailbox/filter_iconv.c (_icvt_destroy): Free the icvt_stream structure. * examples/mimetest.c (message_display_parts): Pass MU_STREAM_NO_CLOSE to the invocation of mu_filter_create. * mail/decode.c (display_submessage): Likewise. * mailbox/attachment.c (mu_message_save_attachment): Likewise. * mh/mh_list.c (eval_body): Likewise. * mh/mhn.c (mhn_message_size, show_internal): Likewise. (finish_text_msg): Likewise; call mu_stream_destroy * imap4d/preauth.c (decode64_buf): remove unnecessary call to mu_stream_destroy. * libmu_auth/ldap.c (chk_md5, chk_smd5) (chk_sha, chk_ssha): Likewise. * mailbox/mutil.c: Fix indentation. --- mailbox/mutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mailbox/mutil.c') diff --git a/mailbox/mutil.c b/mailbox/mutil.c index 19dbcc1c8..70bce589e 100644 --- a/mailbox/mutil.c +++ b/mailbox/mutil.c @@ -1329,8 +1329,8 @@ mu_decode_filter (mu_stream_t *pfilter, mu_stream_t input, { mu_stream_t cvt; status = mu_filter_iconv_create (&cvt, filter, fromcode, tocode, - MU_STREAM_NO_CLOSE, - mu_default_fallback_mode); + MU_STREAM_NO_CLOSE, + mu_default_fallback_mode); if (status == 0) { if (mu_stream_open (cvt)) -- cgit v1.2.1