[Icecast-dev] Memory leak on Icecast 2.3.2 / Debian ?

Jussi Kukkonen jku at goto.fi
Tue Dec 8 12:44:52 PST 2009

Romain Beauxis wrote:
> Le mardi 8 décembre 2009 05:36:53, Jussi Kukkonen a écrit :
>>> The valgrind output seems to indicate a leak in libxml2, I'm gonna try 
>>> to see if this is linked to the way the icecast or libxml package is 
>>> compiled/patched in debian, but I'm not too familiar with this kind of 
>>> problems, so if you have something to say about this issue, I'd love to 
>>> hear about it!
>> xmlEncodeEntitiesReentrant() return values must be freed, so probably 
>> not a libxml problem.
>> The Debian Testing Icecast source (2.3.2-4) does seem to have a case 
>> where they are not freed: a do-while loop in stats.c:stats_get_xml() can 
>> leak when breaking early. This code is not present in -kh17 that I'm 
>> using and all xmlEncodeEntitiesReentrant() calls are fine there.
> I'm co-maintaining the Debian package. I have no time to test it myself right 
> now, but I'd be interested to have your feedback and fix the issue if you find 
> it.

I'm not a icecast developer so I have very little idea what the code in 
question does or how to test it. As a matter of fact I don't even have a 
build environment (or time) available here, this is why I didn't send a 

But since you asked, attached are the missing frees for icecast2_2.3.2-4 
in a totally untested drive-by-patching manner. Like I said the -kh17 I 
also happened to have did not have this specific code at all and the 
xmlEncodeEntitiesReentrant() calls were all fine.

Hope this is at all helpful,

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch
Url: http://lists.xiph.org/pipermail/icecast-dev/attachments/20091208/321bb64d/attachment.txt 

More information about the Icecast-dev mailing list