]> granicus.if.org Git - imagemagick/commitdiff
The -clone option no longer leaks memory
authorCristy <urban-warrior@imagemagick.org>
Wed, 23 Nov 2016 20:41:26 +0000 (15:41 -0500)
committerCristy <urban-warrior@imagemagick.org>
Wed, 23 Nov 2016 20:41:26 +0000 (15:41 -0500)
ChangeLog
MagickCore/splay-tree.c
MagickWand/convert.c
MagickWand/montage.c

index 3a91976d2f13c285852098e95fa200148b848cbf..c215faf83bc81a452e11e34e7ff234e968e37cd5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@
     https://github.com/ImageMagick/ImageMagick/issues/304).
   * Permit EPT images with just a TIFF or EPS image, not both (reference
     https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=30921).
+  * The -clone option no longer leaks memory.
 
 2016-11-15  7.0.3-7 Cristy  <quetzlzacatenango@image...>
   * Release ImageMagick version 7.0.3-7, GIT revision 19024:87aca83:20161115.
index 7e772cd66ac866f32fb9c1cf9d6ff298df51811c..6be31f7b26fa076592c46d9fd5ad59e2c4fd7629 100644 (file)
@@ -315,7 +315,7 @@ static void BalanceSplayTree(SplayTreeInfo *splay_tree)
 %  The format of the CloneSplayTree method is:
 %
 %      SplayTreeInfo *CloneSplayTree(SplayTreeInfo *splay_tree,
-%        void *(*clone_key)(void *),void *(*cline_value)(void *))
+%        void *(*clone_key)(void *),void *(*clone_value)(void *))
 %
 %  A description of each parameter follows:
 %
index 71d8f7cad4d80c696ae60a2fe847e56e6f7ce570..5cde542023694e40f50fae0c0faf1a9c39c66fe8 100644 (file)
@@ -1004,8 +1004,9 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info,
               *clone_images,
               *clone_list;
             
-            clone_list=CloneImageList(image,exception);
-            if (k != 0)
+            if (k == 0)
+              clone_list=CloneImageList(image,exception);
+            else
               clone_list=CloneImageList(image_stack[k-1].image,exception);
             if (clone_list == (Image *) NULL)
               ThrowConvertException(ImageError,"ImageSequenceRequired",option);
index c911a50fddcacd6d172cc1a72fcdc320822cc74a..c6d0da4c147394ebf224cb8bbbb56db7e7e1c5c0 100644 (file)
@@ -635,8 +635,9 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info,
               *clone_images,
               *clone_list;
             
-            clone_list=CloneImageList(image,exception);
-            if (k != 0)
+            if (k == 0)
+              clone_list=CloneImageList(image,exception);
+            else
               clone_list=CloneImageList(image_stack[k-1].image,exception);
             if (clone_list == (Image *) NULL)
               ThrowMontageException(ImageError,"ImageSequenceRequired",option);