memory leak while encoding webp: 6.7.6 - 6.7.9-7

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.
Post Reply
zhcn381
Posts: 17
Joined: 2012-07-05T02:34:18-07:00
Authentication code: 13

memory leak while encoding webp: 6.7.6 - 6.7.9-7

Post 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);
  }
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

Thanks for the problem report and patch. Look for the patch in ImageMagick 6.7.9-8 Beta by sometime tomorrow.
Post Reply