httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: svn commit: r942897 - in /httpd/httpd/trunk: CHANGES server/mpm/prefork/prefork.c
Date Wed, 12 May 2010 19:30:29 GMT
On Wed, May 12, 2010 at 4:24 AM, Joe Orton <jorton@redhat.com> wrote:
> On Mon, May 10, 2010 at 08:47:59PM -0000, Jeff Trawick wrote:
>> --- httpd/httpd/trunk/server/mpm/prefork/prefork.c (original)
>> +++ httpd/httpd/trunk/server/mpm/prefork/prefork.c Mon May 10 20:47:59 2010
>> @@ -549,12 +549,6 @@ static void child_main(int child_num_arg
>>          conn_rec *current_conn;
>>          void *csd;
>>
>> -        /*
>> -         * (Re)initialize this child to a pre-connection state.
>> -         */
>> -
>> -        apr_pool_clear(ptrans);
>> -
>
> ptrans will not be cleared between loop iterations in the case where
> accept fails (the "continue" path) - isn't that a potential memory leak?

If the accept() call itself fails, I don't think it will leak with
current code; if something in APR after accept() fails (probably
should-not-occur), then yes.

The multiple-calls-to-pool_clear solution is definitely safer.

(Thanks!)

Mime
View raw message