Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
visionofarun
Posts: 3 Joined: 2011-12-28T13:10:21-07:00
Authentication code: 8675308
Post
by visionofarun » 2011-12-28T13:14:08-07:00
Hi,
I encountered a memory leak in the coders/jp2.c. I had sent a mail to the imagemagick-bugs mailing list. I was asked to report it here.
Here is the patch for the memory leak. This affects all versions (trunk and stable).
Code: Select all
Index: coders/jp2.c
===================================================================
--- coders/jp2.c (revision 6269)
+++ coders/jp2.c (working copy)
@@ -1011,6 +1011,11 @@
status=jas_image_encode(jp2_image,jp2_stream,format,options) != 0 ?
MagickTrue : MagickFalse;
(void) jas_stream_close(jp2_stream);
+ if (options)
+ {
+ free(options);
+ options = (char *) NULL;
+ }
for (i=0; i < (ssize_t) number_components; i++)
jas_matrix_destroy(pixels[i]);
jas_image_destroy(jp2_image);
Regards,
Arun
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2011-12-28T14:48:23-07:00
Thanks for the problem report and patch. We'll get the patch into ImageMagick 6.7.4-3 Beta by sometime tomorrow.
visionofarun
Posts: 3 Joined: 2011-12-28T13:10:21-07:00
Authentication code: 8675308
Post
by visionofarun » 2011-12-29T01:30:55-07:00
Thanks for your reply. I am wondering if the Windows binary package will be updated with the memory leak fix.
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2011-12-29T07:03:55-07:00
Yes, when ImageMagick 6.7.4-3 is release within a few weeks.