From 9e3572db31f5e41a3b95583e71851132f5cf20ab Mon Sep 17 00:00:00 2001 From: "jinyong.choi" Date: Thu, 5 Apr 2018 14:36:54 +0900 Subject: [PATCH] Fixed memory leak. Destory profile memory after using. --- coders/jp2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coders/jp2.c b/coders/jp2.c index 4efe99d99..a793e1f6c 100644 --- a/coders/jp2.c +++ b/coders/jp2.c @@ -425,7 +425,10 @@ static Image *ReadJP2Image(const ImageInfo *image_info,ExceptionInfo *exception) profile=BlobToStringInfo(jp2_image->icc_profile_buf, jp2_image->icc_profile_len); if (profile != (StringInfo *) NULL) - SetImageProfile(image,"icc",profile,exception); + { + SetImageProfile(image,"icc",profile,exception); + profile=DestroyStringInfo(profile); + } } if (image->ping != MagickFalse) { -- 2.40.0