[Dovecot] Fix for the consume_results leak

Rainer Weikusat rweikusat at mssgmbh.com
Sun Mar 28 14:17:22 EEST 2010


Timo Sirainen <tss at iki.fi> writes:
> On Fri, 2010-03-26 at 15:50 +0100, Rainer Weikusat wrote:
>> I'm not really comfortable with making non-trivial changes to this
>> code but here is at least a fix for the PGresult leak (verified to
>> both apply to 1.2.11 and 2.0.beta4).
>
> Thanks. I did a slightly different change though:
> http://hg.dovecot.org/dovecot-2.0/rev/5a6aaf88f15c

That was the first idea I had, but I thought that the original layout
of the loop (loop until all results have been dealt with) made more
sense. Since there didn't seemed to be a sensible way to do this
without goto (some people strongly object to :->), I then had the idea
that this should really be a problem for the compiler and wrote the
inline routine which ended up creating exactly the 'loop while
PQconsumeInput didn't return an error'-loop in machine code.


More information about the dovecot mailing list