On Tuesday 10 June 2003 06.55, atit_ldce wrote: > Hello Squid Developers, > I found one memory leak at cbdata.c:109 > label = xmalloc(strlen(name) + 20); > > memory is allocated to char pointer label, then in memPoolCreate > there is pool->label = label (in MemPool.c) > but it is not cleared afterwards when MemPool is destroyed(in > MemPool.c:memPoolDestroy()). > > and enabling memory debug also shows memory leak at cbdata. :109. > does string pointed by mempool->label is referrenced after by any > other part of squid after destroying MemPool. > > if no then definately there is memory leak not deallocating memory > assigned to string.
Yes, there is many such one-time memory leaks in Squid where Squid allocates some memory on startup but never frees it on shutdown. There is little to be gained from spending lots of time on getting rid of this type of memory leaks as the memory is automatically freed when the application (squid) terminates even if not explicitly freed. The memory leaks which matters most for Squid is the leaks related to normal processing, i.e. the kind of leaks which can leak more than once during the lifetime of Squid. Regards Henrik
