httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Jaillet" <christophe.jail...@wanadoo.fr>
Subject Potential memory leak in /modules/cache/mod_mem_cache.c
Date Wed, 02 Nov 2005 20:58:54 GMT

Comments agains httpd-2.1.8-beta
=================================

In file mod_mem_cache.c (/modules/cache) around line 558, there is a malloc
(*obj).
A few lines later, another malloc (buf) is performed.

If the second malloc fails, then we have (*obj = NULL) but I don't see
anyway to free the memory allocated.
I would have imagined something like
free (*obj);
*obj = NULL;

Unless, as a newbie in apache, there is something I don't know about memory
management in apache...

Christophe JAILLET





Mime
View raw message