]> granicus.if.org Git - imagemagick/commitdiff
Eliminate small memory leak
authorCristy <urban-warrior@imagemagick.org>
Sat, 22 Oct 2016 15:31:02 +0000 (11:31 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sat, 22 Oct 2016 15:31:02 +0000 (11:31 -0400)
MagickWand/montage.c

index 570195a56d2b964d585babca38b0c7cef5a178c0..c911a50fddcacd6d172cc1a72fcdc320822cc74a 100644 (file)
@@ -265,6 +265,8 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info,
 {
 #define DestroyMontage() \
 { \
+  if (montage_info != (MontageInfo *) NULL) \
+    montage_info=DestroyMontageInfo(montage_info); \
   if (montage_image != (Image *) NULL) \
     montage_image=DestroyImageList(montage_image); \
   DestroyImageStack(); \