]> granicus.if.org Git - imagemagick/commitdiff
Fixed leak reported in: #427.
authorDirk Lemstra <dirk@git.imagemagick.org>
Mon, 17 Apr 2017 16:07:48 +0000 (18:07 +0200)
committerDirk Lemstra <dirk@git.imagemagick.org>
Mon, 17 Apr 2017 16:07:48 +0000 (18:07 +0200)
coders/svg.c

index 65162753cfbdc456a7b7f82fd653658b6bf2c922..7708a0ab52dfb6ca0778194c84e4edb4d59c8215 100644 (file)
@@ -3251,6 +3251,8 @@ static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception)
   image->rows=svg_info->height;
   if (exception->severity >= ErrorException)
     {
+      svg_info=DestroySVGInfo(svg_info);
+      (void) RelinquishUniqueFileResource(filename);
       image=DestroyImage(image);
       return((Image *) NULL);
     }