Possible leak in tiff.c [IM 6.4.3-5]

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
Posts: 13
Joined: 2008-08-28T13:45:14-07:00

Possible leak in tiff.c [IM 6.4.3-5]

Post by dirving »

In the WriteTIFFImage method, we call AcquireQuantumInfo within a do...while loop. At the end of the loop we call DestroyQuantumInfo which tears down the memory accordingly. The leak can occur because there are break statements within the do...while loop which force us out of the loop prior to the DestroyQuantumInfo statement being reached. The leak can be stopped by adding the following lines after the loop (line 2686):

Code: Select all

  if (quantum_info != (QuantumInfo *) NULL)
User avatar
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Possible leak in tiff.c [IM 6.4.3-5]

Post by magick »

Thanks for the memory leak alert and patch. We will have the patch in the ImageMagick subversion trunk by tomorrow.
Post Reply