On Wed, May 12, 2010 at 4:24 AM, Joe Orton <[email protected]> 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!)
