Memory leak in png

Michal Kowalczuk <[email protected]> Mon, 12 Sep 2005 13:51:12 +0200
Newsgroups gmane.comp.video.graphicsmagick.bugs
Organization Drużyna Pingwina
Message-ID <[email protected]>
Hello again ;)
gm-1.1.6, coders/png.c, line 1785:
#v+
ifdef PNG_FREE_ME_SUPPORTED
	image->color_profile.name=AllocateString("icm");
	image->color_profile.info=(unsigned char *) info;
	png_data_freer(ping, ping_info, PNG_USER_WILL_FREE_DATA,
	   PNG_FREE_ICCP);
#else
#v-

name is never freed, so we loose memory when processing PNGs with iCCP
information.
Sample iCCP images can be found here:
http://www.libpng.org/pub/png/colorcube/colorcube-pngs-iCCP.html

-- 
 _  <= Michał Kowalczuk => <== (http://)|(mailto:sammael@)brzydal.eu.org/? ==>
( ` <= GG#2113900 => <==== Mff pmfmffpmpmpp mfmmffpffpmffmm fppmfffmpmfp ====>
 \  /||\ /||\ /||\ |~~| <== mmpmffmfm mpfmmmfmp fmpmfffmpfmpmffmppfmm [...] =>
,_)/~|| ` || ` ||~\|~_|_   <========================= --Kenny, South Park ===>



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf