From: Graham Leggett [mailto:[email protected]]
Sent: Donnerstag, 11. September 2014 06:40
To: [email protected]
Subject: Re: [Patch] Async write completion for the full connection filter stack

On 11 Sep 2014, at 1:51 AM, Yann Ylavic 
<[email protected]<mailto:[email protected]>> wrote:


> +    else if (*deferred_write_pool) {
> +        /*
> +         * There are no more requests in the pipeline. We can just clear the
> +         * pool.
> +         */
>
> Shouldn't *buffered_bb be set to NULL here when *deferred_write_pool
> == (*buffered_bb)->p, or more generally
> apr_pool_is_ancestor(*deferred_write_pool, (*buffered_bb)->p). We
> can't leave a dangling pointer in this case.
>
> +        apr_pool_clear(*deferred_write_pool);

Hmmm... this came from the original code.
We can't set buffered_bb to NULL unless we are sure we created buffered_bb, and 
this isn't necessarily the case. In the core filter, buffered_bb is created 
when the connection is created.

How about doing a

apr_brigade_cleanup(buffered_bb)

before the  apr_pool_clear?

Regards

Rüdiger


Reply via email to