Page 1 of 1

When build with zero configuration, display always crashed.

Posted: 2013-04-18T02:35:00-07:00
by sxzzsf
After debugging, I found that the memory can not freed directly via free(), here is the patch:

Code: Select all

--- ImageMagick-6.8.4-10/magick/xwindow.c.orig  2013-04-18 17:17:46.954436795 +0800
+++ ImageMagick-6.8.4-10/magick/xwindow.c       2013-04-18 17:19:50.580110884 +0800
@@ -5659,7 +5659,7 @@
         }
 #endif
       if (window->ximage->data != (char *) NULL)
-        free(window->ximage->data);
+        RelinquishMagickMemory(window->ximage->data);
       window->ximage->data=(char *) NULL;
       XDestroyImage(window->ximage);
       window->ximage=(XImage *) NULL;
@@ -5713,7 +5713,7 @@
         Free matte image.
       */
       if (window->matte_image->data != (char *) NULL)
-        free(window->matte_image->data);
+        RelinquishMagickMemory(window->matte_image->data);
       window->matte_image->data=(char *) NULL;
       XDestroyImage(window->matte_image);
       window->matte_image=(XImage *) NULL;

Re: When build with zero configuration, display always crash

Posted: 2013-04-18T03:37:42-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick 6.8.5-0 Beta available by sometime tomorrow. Thanks.