Possible memory leak - locale.c

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
dirving
Posts: 13
Joined: 2008-08-28T13:45:14-07:00

Possible memory leak - locale.c

Post 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: ???
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Possible memory leak - locale.c

Post by magick »

We fixed the problem you reported. Look for the patch in ImageMagick 6.4.7-5 available sometime tomorrow. Thanks.
Post Reply