Menu

#490 memory leak in WriteFITSImage

v1.0_(example)
closed-fixed
None
5
2017-09-30
2017-09-25
bestshow
No

Here is the critical code : (in WriteFITSImage)

  fits_info=MagickAllocateMemory(char *,FITS_BLOCK_SIZE);
  pixels=MagickAllocateMemory(unsigned char *,packet_size*image->columns); //768
  if ((fits_info == (char *) NULL) || (pixels == (unsigned char *) NULL))
    {
      MagickFreeMemory(fits_info);
      ThrowWriterException(ResourceLimitError,MemoryAllocationFailed,image);
    }

If "fits_info" is null and the "pixels" was not null,the pixels will cause meomory leak.

Credit : ADLab of Venustech

Discussion

  • Bob Friesenhahn

    Bob Friesenhahn - 2017-09-30
    • status: open --> closed-fixed
    • assigned_to: Bob Friesenhahn
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2017-09-30

    This problem is fixed by Mercurial changeset 15196:4a1401695913. Thanks for the report!

     

Log in to post a comment.

MongoDB Logo MongoDB