]> granicus.if.org Git - imagemagick/commitdiff
Remove unnecessary check.
authorDirk Lemstra <dirk@git.imagemagick.org>
Thu, 27 Apr 2017 08:49:38 +0000 (10:49 +0200)
committerDirk Lemstra <dirk@git.imagemagick.org>
Thu, 27 Apr 2017 08:49:38 +0000 (10:49 +0200)
coders/png.c

index f623fc2f2fe43a6cb2a03edb5a89071187554187..2d2ae81d5ea8163cc7c0ee83a7be391cd09f3fd7 100644 (file)
@@ -5547,8 +5547,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,
           {
             if (length != 28)
               {
-                if (chunk)
-                  chunk=(unsigned char *) RelinquishMagickMemory(chunk);
+                chunk=(unsigned char *) RelinquishMagickMemory(chunk);
                 ThrowReaderException(CorruptImageError,"CorruptImage");
               }