apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: apr_reslist_release does not notice "double releases". Bug or feature?
Date Tue, 07 Mar 2006 20:27:32 GMT

On 03/07/2006 12:34 AM, Nick Kew wrote:
> On Monday 06 March 2006 22:37, Ruediger Pluem wrote:

> How does a resource get released more than once?  Are we talking about
> logic equivalent to a double-free, or something more subtle?

Yes, it is a simple "double-free" problem. Just do

apr_reslist_release(reslist, (void *)conn);

for conn aquired via apr_reslist_aquire twice and you have conn twice in
the reslist. So two following calls to apr_reslist_aquire can return conn.
Of course the conn pointer is stored in different containers inside the reslist.



View raw message