Menu

#491 memory leak in WriteGIFImage

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

Here is the critical code : (in WriteGIFImage)

  global_colormap=MagickAllocateMemory(unsigned char *,768); //1295
  colormap=MagickAllocateMemory(unsigned char *,768);
  if ((global_colormap == (unsigned char *) NULL) ||
      (colormap == (unsigned char *) NULL))
    ThrowWriterException(ResourceLimitError,MemoryAllocationFailed,image);

The global_colormap and colormap are not freed before Exception, so it will cause memory 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 15197:57ea336cefaa. Thanks for the report!

     

Log in to post a comment.

MongoDB Logo MongoDB