]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/564
authorCristy <urban-warrior@imagemagick.org>
Sun, 16 Jul 2017 19:03:24 +0000 (15:03 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 16 Jul 2017 19:03:24 +0000 (15:03 -0400)
coders/wmf.c

index 00d3f3c25cec1f2c446656688de1f3b7d4960f45..e5913372b58f1afffbeb77163d0bcef581661c06 100644 (file)
@@ -819,7 +819,8 @@ static void ipa_device_close(wmfAPI * API)
       ddata->draw_info=(DrawInfo *)NULL;
     }
   if (WMF_MAGICK_GetFontData(API)->ps_name)
-    RelinquishMagickMemory(WMF_MAGICK_GetFontData(API)->ps_name);
+    WMF_MAGICK_GetFontData(API)->ps_name=RelinquishMagickMemory(
+      WMF_MAGICK_GetFontData(API)->ps_name);
 }
 
 /*
@@ -2853,7 +2854,6 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
 
   if (image_info->ping != MagickFalse)
     {
-      ipa_device_close(API);
       wmf_api_destroy(API);
       (void) CloseBlob(image);
       if (image->debug != MagickFalse)
@@ -2897,7 +2897,6 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
           (void) LogMagickEvent(CoderEvent,GetMagickModule(),
             "leave ReadWMFImage()");
         }
-      ipa_device_close(API);
       wmf_api_destroy(API);
       ThrowReaderException(DelegateError,"FailedToRenderFile");
     }