httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: Possible memory leak in mod_proxy_http.c?
Date Thu, 05 Jan 2006 16:13:30 GMT
On Thu, Jan 05, 2006 at 04:36:10PM +0100, Ruediger Pluem wrote:
> I noticed that in ap_proxy_http_process_response of mod_proxy_http.c we never
> call apr_brigade_destroy for the locally created brigade bb.
> We only call apr_brigade_cleanup on this brigade.
> Isn't this a memory leak?

With the current allocation strategy for brigades, not really.

Currently it's safer to call _cleanup rather than _destroy in most 
cases, since _destroy is equivalent to _cleanup but also unregisters the 
pool cleanup; so if a _destroy()ed brigade does get reused, it is at 
risk of leaking any contained buckets until the associated bucket 
allocator gets nuked.

joe

Mime
View raw message