apr-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: r910597 - /apr/apr/trunk/shmem/unix/shm.c
Date Wed, 17 Feb 2010 14:48:24 GMT
On Tuesday, February 16, 2010, Mladen Turk <mturk@apache.org> wrote:
> On 02/16/2010 06:07 PM, jfclere@apache.org wrote:
>
> Log:
> Make sure we don't leak file descriptors.
>
>           if (new_m->shmkey == (key_t)-1) {
> +            apr_file_close(file);
>               return errno;
>           }
>
>
> File will be closed when the pool gets destroyed.
> Closing here has little advantages cause the pool
> memory will rise over time so you cannot be sure
> the provided pool won't get dirty if open fails.

Makes sense here


-- 
Born in Roswell... married an alien...

Mime
View raw message