gnome-desktop r5290 - trunk/libgnome-desktop



Author: vuntz
Date: Mon Dec  1 17:03:52 2008
New Revision: 5290
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5290&view=rev

Log:
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.


Modified:
   trunk/libgnome-desktop/ChangeLog
   trunk/libgnome-desktop/gnome-desktop-thumbnail.c

Modified: trunk/libgnome-desktop/gnome-desktop-thumbnail.c
==============================================================================
--- trunk/libgnome-desktop/gnome-desktop-thumbnail.c	(original)
+++ trunk/libgnome-desktop/gnome-desktop-thumbnail.c	Mon Dec  1 17:03:52 2008
@@ -804,9 +804,8 @@
   if (script)
     {
       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)
 	{
@@ -823,8 +822,8 @@
 
 	  g_free (expanded_script);
 	  g_unlink(tmpname);
+	  g_free (tmpname);
 	}
-      g_free (tmpname);
     }
 
   /* Fall back to gdk-pixbuf */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]