Tomasz Potega
2013-Nov-06 09:31 UTC
[Dovecot] Missing i_stream_unref in imap_msgpart_crlf_seek()?
Hi,
imap_msgpart_crlf_seek() returns an error stream in case of problems
in message_skip_virtual(). The original input stream is not being
unreferenced, preventing destroy callbacks from being executed.
Shouldn't we have an i_stream_unref(&input) here:
src/lib-imap-storage/imap-msgpart.c:
398 if (message_skip_virtual(input, virtual_skip, &cr_skipped)
< 0) {
399 errinput = i_stream_create_error(errno);
400 i_stream_set_name(errinput, i_stream_get_name(input));
401 return errinput;
402 }
?
Best regards,
Tomasz Pot?ga
[Wirtualna Polska]
<http://www.wp.pl>
Znajdziesz nas tutaj:
[Wp na Facebooku] <https://www.facebook.com/WirtualnaPolska>
[Wp na Twitterze] <https://twitter.com/wirtualnapolska>
[Wp na SlideShare] <http://www.slideshare.net/wirtualnapolska>
[Wp w Google+] <https://plus.google.com/+wppl>
[Wp na YouTube] <https://www.youtube.com/user/wptvwppl>
"WIRTUALNA POLSKA" Sp??ka Akcyjna z siedzib? w Gda?sku przy ul.
Traugutta 115 C, wpisana do Krajowego Rejestru S?dowego - Rejestru
Przedsi?biorc?w prowadzonego przez S?d Rejonowy Gda?sk - P??noc w Gda?sku pod
numerem KRS 0000068548, o kapitale zak?adowym 67.980.024,00 z?otych op?aconym w
ca?o?ci oraz Numerze Identyfikacji Podatkowej 957-07-51-216.
Timo Sirainen
2013-Nov-06 11:00 UTC
[Dovecot] Missing i_stream_unref in imap_msgpart_crlf_seek()?
On 6.11.2013, at 11.31, Tomasz Potega <tpotega at wp-sa.pl> wrote:> imap_msgpart_crlf_seek() returns an error stream in case of problems > in message_skip_virtual(). The original input stream is not being > unreferenced, preventing destroy callbacks from being executed. > > Shouldn't we have an i_stream_unref(&input) here: > > src/lib-imap-storage/imap-msgpart.c: > 398 if (message_skip_virtual(input, virtual_skip, &cr_skipped) > < 0) { > 399 errinput = i_stream_create_error(errno); > 400 i_stream_set_name(errinput, i_stream_get_name(input)); > 401 return errinput; > 402 } > > ?Yep: http://hg.dovecot.org/dovecot-2.2/rev/0505adfe2d8e