Page 1 of 1

memory leak while encoding webp: 6.7.6 - 6.7.9-7

Posted: 2012-09-25T22:54:42-07:00
by zhcn381
hi magick,
we are using IM6.7.6 in our production system. And we noticed that while doing the encoding of webp there is a memory leak. I've checked the latest version(6.7.9-7) and finding that the problem still exists. Following is the patch, pls check it, thx.

Code: Select all


Index: coders/webp.c                                                                                                              
 ===================================================================
 --- coders/webp.c (版本 9429)
 +++ coders/webp.c (工作副本)
 @@ -391,6 +391,7 @@
      webp_status=WebPPictureImportRGBA(&picture,pixels,4*picture.width);
    pixels=(unsigned char *) RelinquishMagickMemory(pixels);
    webp_status=WebPEncode(&configure,&picture);
+  WebPPictureFree(&picture);
    (void) CloseBlob(image);
    return(webp_status == 0 ? MagickFalse : MagickTrue);
  }

Re: memory leak while encoding webp: 6.7.6 - 6.7.9-7

Posted: 2012-09-26T02:43:48-07:00
by magick
Thanks for the problem report and patch. Look for the patch in ImageMagick 6.7.9-8 Beta by sometime tomorrow.