Skip to content
Permalink
Browse files Browse the repository at this point in the history
https://github.com/ImageMagick/ImageMagick/issues/636
  • Loading branch information
Cristy committed Aug 1, 2017
1 parent 1f5e947 commit e793eb2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
2017-07-01 7.0.6-5 Cristy <quetzlzacatenango@image...>
* Fixed numerous memory leaks (reference
https://github.com/ImageMagick/ImageMagick/issues).

2017-07-29 7.0.6-5 Glenn Randers-Pehrson <glennrp@image...>
* Properly set image->colorspace in the PNG decoder (previously
it was setting image->gamma, but only setting image->colorspace
Expand Down
13 changes: 13 additions & 0 deletions coders/msl.c
Expand Up @@ -7899,12 +7899,25 @@ static MagickBooleanType ProcessMSLScript(const ImageInfo *image_info,
}
if (msl_info.exception->severity == UndefinedException)
(void) xmlParseChunk(msl_info.parser," ",1,MagickTrue);
/*
Free resources.
*/
xmlFreeParserCtxt(msl_info.parser);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"end SAX");
msl_info.group_info=(MSLGroupInfo *) RelinquishMagickMemory(
msl_info.group_info);
if (*image == (Image *) NULL)
*image=(*msl_info.image);
*msl_info.image_info=DestroyImageInfo(*msl_info.image_info);
msl_info.image_info=(ImageInfo **) RelinquishMagickMemory(
msl_info.image_info);
*msl_info.draw_info=DestroyDrawInfo(*msl_info.draw_info);
msl_info.draw_info=(DrawInfo **) RelinquishMagickMemory(msl_info.draw_info);
msl_info.image=(Image **) RelinquishMagickMemory(msl_info.image);
*msl_info.attributes=DestroyImage(*msl_info.attributes);
msl_info.attributes=(Image **) RelinquishMagickMemory(msl_info.attributes);
msl_info.group_info=(MSLGroupInfo *) RelinquishMagickMemory(
msl_info.group_info);
if (msl_info.exception->severity != UndefinedException)
return(MagickFalse);
return(MagickTrue);
Expand Down

0 comments on commit e793eb2

Please sign in to comment.