Re: [GD-DEVEL] Re: Memory leak
| From: | Takeshi Abe | Date: | Wed, 26 Nov 2008 18:20:57 +0000 |
| Subject: | Re: [GD-DEVEL] Re: Memory leak | ||
| References: | 1 2 3 | Groups: | php.gd.devel |
| Request: | Send a blank email to php-gd-devel+get-519@lists.php.net to get a copy of this message | ||
Hi Brian,
On Wed, 26 Nov 2008 10:23:03 -0600, Brian Peschel <brianp@occinc.com> wrote:
> Valgrind is also reporting a slightly different leak in the same code
>
> ==16200== 936,771 (561,456 direct, 375,315 indirect) bytes in 137 blocks are definitely lost in
> loss record
> 742 of 744
> ==16200== at 0x4004864: calloc (vg_replace_malloc.c:279)
> ==16200== by 0xD8FA2D: xpmParseColors (in /usr/lib/libXpm.so.4.11.0)
> ==16200== by 0xD903F0: xpmParseData (in /usr/lib/libXpm.so.4.11.0)
> ==16200== by 0xD893B9: XpmReadFileToXpmImage (in /usr/lib/libXpm.so.4.11.0)
> ==16200== by 0x80CBED5: gdImageCreateFromXpm (in )
> ==16200== by 0x437E45F: XpmImageConverter::getImageDimensions() ()
>
> Does this help or complicate things?
Thanks for your reports!
I have reproduced the leaks too. It must be a libgd's bug (so opened
http://bugs.libgd.org/?do=details&task_id=185
), and its cause is that
gdImageCreateFromXpm() forgot to release the resource allocated by
xpmParseData etc.
I'll prepare a fix for it asap.
Cheers,
-- Takeshi Abe