httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <...@apache.org>
Subject Re: Question about malloc / realloc in module
Date Wed, 14 Sep 2011 12:43:32 GMT
On Wed, 14 Sep 2011 14:01:19 +0200
Christoph Gröver <grover@sitepark.com> wrote:

> So would this result in a memory leak? (if this happens often!)

Potentially yes, unless you can do an exhaustive analysis of all
possible processing paths.

The fix for that is to register a free as a pool cleanup
immediately after the malloc/realloc.  See mod_proxy_html
for an example.

-- 
Nick Kew

Mime
View raw message