Commit 6be8b991 authored by Vincent Untz's avatar Vincent Untz Committed by Vincent Untz

fix crash tempfile cannot be created, and plug leak. Fix bug #562003.

2008-12-01  Vincent Untz  <vuntz@gnome.org>

	* gnome-desktop-thumbnail.c:
	(gnome_desktop_thumbnail_factory_generate_thumbnail): fix crash
	tempfile cannot be created, and plug leak. Fix bug #562003.

svn path=/trunk/; revision=5290
parent 9504bbb2
2008-12-01 Vincent Untz <vuntz@gnome.org>
* gnome-desktop-thumbnail.c:
(gnome_desktop_thumbnail_factory_generate_thumbnail): fix crash
tempfile cannot be created, and plug leak. Fix bug #562003.
2008-12-01 Vincent Untz <vuntz@gnome.org> 2008-12-01 Vincent Untz <vuntz@gnome.org>
* gnome-bg.c: (gnome_bg_finalize): clean previous patch * gnome-bg.c: (gnome_bg_finalize): clean previous patch
......
...@@ -804,9 +804,8 @@ gnome_desktop_thumbnail_factory_generate_thumbnail (GnomeDesktopThumbnailFactory ...@@ -804,9 +804,8 @@ gnome_desktop_thumbnail_factory_generate_thumbnail (GnomeDesktopThumbnailFactory
if (script) if (script)
{ {
int fd; int fd;
GError *error = NULL;
fd = g_file_open_tmp (".gnome_desktop_thumbnail.XXXXXX", &tmpname, &error); fd = g_file_open_tmp (".gnome_desktop_thumbnail.XXXXXX", &tmpname, NULL);
if (fd != -1) if (fd != -1)
{ {
...@@ -823,8 +822,8 @@ gnome_desktop_thumbnail_factory_generate_thumbnail (GnomeDesktopThumbnailFactory ...@@ -823,8 +822,8 @@ gnome_desktop_thumbnail_factory_generate_thumbnail (GnomeDesktopThumbnailFactory
g_free (expanded_script); g_free (expanded_script);
g_unlink(tmpname); g_unlink(tmpname);
g_free (tmpname);
} }
g_free (tmpname);
} }
/* Fall back to gdk-pixbuf */ /* Fall back to gdk-pixbuf */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment