From: Dirk Lemstra Date: Sun, 4 Mar 2018 10:55:04 +0000 (+0100) Subject: Removed duplicate free's. X-Git-Tag: 7.0.7-25~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b89b84e4a873ab43226ae6762818ef5a898a34fe;p=imagemagick Removed duplicate free's. --- diff --git a/coders/rle.c b/coders/rle.c index 866d315ce..9b2439b86 100644 --- a/coders/rle.c +++ b/coders/rle.c @@ -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.