]> granicus.if.org Git - imagemagick/commitdiff
Removed duplicate free's.
authorDirk Lemstra <dirk@git.imagemagick.org>
Sun, 4 Mar 2018 10:55:04 +0000 (11:55 +0100)
committerDirk Lemstra <dirk@git.imagemagick.org>
Sun, 4 Mar 2018 10:55:58 +0000 (11:55 +0100)
coders/rle.c

index 866d315ce45ac18d5dd519661b240cbdbe3227cc..9b2439b8622bbd75df00bcbdbef1707eb616580d 100644 (file)
@@ -441,12 +441,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
           operand++;
           if ((offset < 0) ||
               ((size_t) (offset+operand*number_planes) > pixel_info_length))
-            {
-              if (number_colormaps != 0)
-                colormap=(unsigned char *) RelinquishMagickMemory(colormap);
-              pixel_info=RelinquishVirtualMemory(pixel_info);
-              ThrowRLEException(CorruptImageError,"UnableToReadImageData");
-            }
+            ThrowRLEException(CorruptImageError,"UnableToReadImageData");
           p=pixels+offset;
           for (i=0; i < (ssize_t) operand; i++)
           {
@@ -479,12 +474,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
           operand++;
           if ((offset < 0) ||
               ((size_t) (offset+operand*number_planes) > pixel_info_length))
-            {
-              if (number_colormaps != 0)
-                colormap=(unsigned char *) RelinquishMagickMemory(colormap);
-              pixel_info=RelinquishVirtualMemory(pixel_info);
-              ThrowRLEException(CorruptImageError,"UnableToReadImageData");
-            }
+            ThrowRLEException(CorruptImageError,"UnableToReadImageData");
           p=pixels+offset;
           for (i=0; i < (ssize_t) operand; i++)
           {
@@ -532,11 +522,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
                 p++;
               }
         if ((i < (ssize_t) number_pixels) || (x < (ssize_t) number_planes))
-          {
-            colormap=(unsigned char *) RelinquishMagickMemory(colormap);
-            pixel_info=RelinquishVirtualMemory(pixel_info);
-            ThrowRLEException(CorruptImageError,"UnableToReadImageData");
-          }
+          ThrowRLEException(CorruptImageError,"UnableToReadImageData");
       }
     /*
       Initialize image structure.