]> granicus.if.org Git - imagemagick/commitdiff
Fixed memory leak.
authordirk <dirk@git.imagemagick.org>
Wed, 19 Oct 2016 05:28:09 +0000 (07:28 +0200)
committerdirk <dirk@git.imagemagick.org>
Wed, 19 Oct 2016 05:28:09 +0000 (07:28 +0200)
coders/psd.c

index 47e85927f41f86c2c0c5c35fdbb7bda969492fd7..ee2f6c5298330aad6b08d2432e3e0703b938b9cc 100644 (file)
@@ -1739,6 +1739,8 @@ ModuleExport MagickBooleanType ReadPSDLayers(Image *image,
             if (image->debug != MagickFalse)
               (void) LogMagickEvent(CoderEvent,GetMagickModule(),
                 "      layer data is empty");
+            if (layer_info[i].info != (StringInfo *) NULL)
+              layer_info[i].info=DestroyStringInfo(layer_info[i].info);
             continue;
           }