Page 1 of 1

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

Posted: 2008-08-29T08:26:07-07:00
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)
	    quantum_info=DestroyQuantumInfo(quantum_info);

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

Posted: 2008-08-29T08:38:33-07:00
by magick
Thanks for the memory leak alert and patch. We will have the patch in the ImageMagick subversion trunk by tomorrow.