Page 1 of 1

Possible memory leak - locale.c

Posted: 2008-12-09T08:09:31-07:00
by dirving
I believe there may be a memory leak in 6.4.7-4 in locale.c. It appears that on line 873 the variable xml is malloc'ed and never released. Here is a snippit from a valgrind report that I ran:

==16432== 49,381 bytes in 1 blocks are possibly lost in loss record 17 of 17
==16432== at 0x4006AEE: malloc (vg_replace_malloc.c:207)
==16432== by 0x4210A25: AcquireMagickMemory (memory.c:337)
==16432== by 0x4210C07: AcquireQuantumMemory (memory.c:411)
==16432== by 0x414DD28: FileToBlob (blob.c:835)
==16432== by 0x426C81A: FileToString (string.c:926)
==16432== by 0x4209B58: LoadLocaleList (locale.c:873)
==16432== by 0x420A2AC: GetLocaleInfo_ (locale.c:1034)
==16432== by 0x420A4A4: GetLocaleMessage (locale.c:433)
==16432== by 0x41DF57F: GetLocaleExceptionMessage (exception.c:555)
==16432== by 0x41DFE89: ThrowMagickExceptionList (exception.c:938)
==16432== by 0x41E006D: ThrowMagickException (exception.c:968)
==16432== by 0x400F1AA: ???

Re: Possible memory leak - locale.c

Posted: 2008-12-09T09:39:37-07:00
by magick
We fixed the problem you reported. Look for the patch in ImageMagick 6.4.7-5 available sometime tomorrow. Thanks.