Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6615:63b4e1932a89 HEAD
Error handling fix.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 25 Oct 2007 21:04:27 +0300 |
parents | ab3d8fba6420 |
children | be366eda336e |
files | src/plugins/zlib/zlib-plugin.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/zlib/zlib-plugin.c Thu Oct 25 20:55:31 2007 +0300 +++ b/src/plugins/zlib/zlib-plugin.c Thu Oct 25 21:04:27 2007 +0300 @@ -47,16 +47,17 @@ if (zmail->super.get_stream(_mail, NULL, NULL, &input) < 0) return -1; + i_assert(input == imail->data.stream); fname = maildir_uidlist_lookup(mbox->uidlist, _mail->uid, &flags); i_assert(fname != NULL); p = strstr(fname, ":2,"); if (p != NULL && strchr(p + 3, 'Z') != NULL) { /* has a Z flag - it's compressed */ - fd = dup(i_stream_get_fd(input)); + fd = dup(i_stream_get_fd(imail->data.stream)); if (fd == -1) i_error("zlib plugin: dup() failed: %m"); - i_stream_unref(&input); + i_stream_unref(&imail->data.stream); if (fd == -1) return -1;