Skip to content

Memory leak in WriteSGIImage  #1052

Closed
Closed
@jgj212

Description

@jgj212

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am using the latest version of ImageMagick
  • I have searched open and closed issues to ensure it has not already been reported

Description

Memory leak in WriteSGIImage

Steps to Reproduce

    pixel_info=AcquireVirtualMemory((size_t) number_pixels,4*					//line 1015, allocation for pixel_info
      iris_info.bytes_per_pixel*sizeof(*pixels));
    if (pixel_info == (MemoryInfo *) NULL)
      ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
            if (offsets != (ssize_t *) NULL)
              offsets=(ssize_t *) RelinquishMagickMemory(offsets);
            if (runlength != (size_t *) NULL)
              runlength=(size_t *) RelinquishMagickMemory(runlength);
            if (packet_info != (MemoryInfo *) NULL)
              packet_info=RelinquishVirtualMemory(packet_info);
            ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");	//line 1132, memory leak as not free pixel_info

System Configuration

  • ImageMagick version: 7.0.7-28
  • Environment (Operating system, version and so on): Ubuntu14.04 x86_64
  • Additional information:

Credit: ADLab of Venustech

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions