]> granicus.if.org Git - imagemagick/commitdiff
Return NULL if WaveletDenoiseImage() does not complete
authorCristy <urban-warrior@imagemagick.org>
Sun, 28 Feb 2016 20:04:15 +0000 (15:04 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sun, 28 Feb 2016 20:04:15 +0000 (15:04 -0500)
MagickCore/fx.c

index 5a7841bdd221337e8bb6f745f306e875f1f15db5..79e2f90e4595df58bfbbeed73d3eb439b0ba168e 100644 (file)
@@ -6026,5 +6026,7 @@ MagickExport Image *WaveletDenoiseImage(const Image *image,
   image_view=DestroyCacheView(image_view);
   kernel=(double *) RelinquishMagickMemory(kernel);
   pixels_info=RelinquishVirtualMemory(pixels_info);
+  if (status == MagickFalse)
+    noise_image=DestroyImage(noise_image);
   return(noise_image);
 }