Subject: bug#576: 23.0.60; displaying SVG leaks memory

From: Chong Yidong <[email-masked]>
Date: Fri, 25 Jul 2008 01:25:42 -0400

> The following form makes Emacs use increasingly more memory:
>
>   (progn
>     (find-file "~/emacs/etc/images/splash.svg")
>     (while t
>       (image-toggle-display)
>       (redisplay)))

Does the following patch fix the memory leak for you?

*** trunk/src/image.c.~1.106.~	2008-07-22 00:51:50.000000000 -0400
--- trunk/src/image.c	2008-07-25 01:23:04.000000000 -0400
***************
*** 9025,9030 ****
--- 9025,9031 ----
       went ok.  */
    pixbuf = fn_rsvg_handle_get_pixbuf (rsvg_handle);
    eassert (pixbuf);
+   fn_rsvg_handle_free (rsvg_handle);

    /* Extract some meta data from the svg handle.  */
    width     = fn_gdk_pixbuf_get_width (pixbuf);