On 6/6/07, YAMAMOTO Mitsuharu <[EMAIL PROTECTED]> wrote:
In xpm_load (if HAVE_XPM and ALLOC_XPM_COLORS), xpm_init_color_cache is called twice without an intervening xpm_free_color_cache call, and that causes a memory leak ~4KB per XPM image creation.
Try removing the second one; I think it's a leftover from a patch by Chong. Juanma Index: src/image.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/image.c,v retrieving revision 1.70 diff -u -2 -r1.70 image.c --- src/image.c 3 Jun 2007 00:23:33 -0000 1.70 +++ src/image.c 6 Jun 2007 09:38:34 -0000 @@ -3968,4 +3968,5 @@ attrs.free_colors = xpm_free_colors; attrs.valuemask |= XpmAllocColor | XpmFreeColors | XpmColorClosure; + xpm_init_color_cache (f, &attrs); #else /* not ALLOC_XPM_COLORS */ /* Let the XPM lib allocate colors. */ @@ -3979,7 +3980,4 @@ #endif /* not XpmAllocCloseColors */ #endif /* ALLOC_XPM_COLORS */ -#ifdef ALLOC_XPM_COLORS - xpm_init_color_cache (f, &attrs); -#endif /* If image specification contains symbolic color definitions, add @@ -4021,8 +4019,4 @@ /* Create a pixmap for the image, either from a file, or from a string buffer containing data in the same format as an XPM file. */ -#ifdef ALLOC_XPM_COLORS - xpm_init_color_cache (f, &attrs); -#endif - specified_file = image_spec_value (img->spec, QCfile, NULL); _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug