Don't leak the file contents.

Mon Aug  9 00:28:34 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkicontheme.c (load_svg_at_size): Don't leak the
	file contents.
This commit is contained in:
Matthias Clasen 2004-08-09 04:30:26 +00:00 committed by Matthias Clasen
parent ecf2d1070c
commit ad534c2bb7
5 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Mon Aug 9 00:28:34 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkicontheme.c (load_svg_at_size): Don't leak the
file contents.
Mon Aug 9 00:13:03 2004 Matthias Clasen <maclas@gmx.de> Mon Aug 9 00:13:03 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaboutdialog.c (icon_set_new_from_pixbufs): Don't * gtk/gtkaboutdialog.c (icon_set_new_from_pixbufs): Don't

View File

@ -1,3 +1,8 @@
Mon Aug 9 00:28:34 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkicontheme.c (load_svg_at_size): Don't leak the
file contents.
Mon Aug 9 00:13:03 2004 Matthias Clasen <maclas@gmx.de> Mon Aug 9 00:13:03 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaboutdialog.c (icon_set_new_from_pixbufs): Don't * gtk/gtkaboutdialog.c (icon_set_new_from_pixbufs): Don't

View File

@ -1,3 +1,8 @@
Mon Aug 9 00:28:34 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkicontheme.c (load_svg_at_size): Don't leak the
file contents.
Mon Aug 9 00:13:03 2004 Matthias Clasen <maclas@gmx.de> Mon Aug 9 00:13:03 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaboutdialog.c (icon_set_new_from_pixbufs): Don't * gtk/gtkaboutdialog.c (icon_set_new_from_pixbufs): Don't

View File

@ -1,3 +1,8 @@
Mon Aug 9 00:28:34 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkicontheme.c (load_svg_at_size): Don't leak the
file contents.
Mon Aug 9 00:13:03 2004 Matthias Clasen <maclas@gmx.de> Mon Aug 9 00:13:03 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaboutdialog.c (icon_set_new_from_pixbufs): Don't * gtk/gtkaboutdialog.c (icon_set_new_from_pixbufs): Don't

View File

@ -2195,7 +2195,7 @@ load_svg_at_size (const gchar *filename,
{ {
GdkPixbuf *pixbuf = NULL; GdkPixbuf *pixbuf = NULL;
GdkPixbufLoader *loader = NULL; GdkPixbufLoader *loader = NULL;
gchar *contents; gchar *contents = NULL;
gsize length; gsize length;
if (!g_file_get_contents (filename, if (!g_file_get_contents (filename,
@ -2219,6 +2219,8 @@ load_svg_at_size (const gchar *filename,
bail: bail:
if (loader) if (loader)
g_object_unref (loader); g_object_unref (loader);
if (contents)
g_free (contents);
return pixbuf; return pixbuf;
} }