So, same reason. Also in file mod_mem_cache.c around line 786, there is a malloc(mobj->m_len), and a few lines later, another malloc(obj->count) is performed.
If the second malloc fails, I think also should add something like free(mobj->m); mobj->m = NULL; reasonable? Thx, Xuekun On 11/3/05, Bill Stoddard <[EMAIL PROTECTED]> wrote: > Christophe Jaillet wrote: > > 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 > > > > Agreed, looks like a bug and your fix looks right. > > Bill > >
