gtk+ r21611 - in trunk: . gtk



Author: chpe
Date: Wed Oct  8 21:00:56 2008
New Revision: 21611
URL: http://svn.gnome.org/viewvc/gtk+?rev=21611&view=rev

Log:
Bug 554702 â gtkfilesystem leaks GError
Also fixes some "format not a string literal and no format arguments"
warnings.

Modified:
   trunk/ChangeLog
   trunk/gtk/gtkfilesystem.c

Modified: trunk/gtk/gtkfilesystem.c
==============================================================================
--- trunk/gtk/gtkfilesystem.c	(original)
+++ trunk/gtk/gtkfilesystem.c	Wed Oct  8 21:00:56 2008
@@ -323,7 +323,7 @@
 				NULL, FALSE, 0, NULL,
 				NULL, &error))
     {
-      g_critical (error->message);
+      g_critical ("%s", error->message);
       g_error_free (error);
     }
 
@@ -531,7 +531,10 @@
 						 G_FILE_MONITOR_NONE,
 						 NULL, &error);
   if (error)
-    g_warning (error->message);
+    {
+      g_warning ("%s", error->message);
+      g_error_free (error);
+    }
   else
     g_signal_connect (priv->bookmarks_monitor, "changed",
 		      G_CALLBACK (bookmarks_file_changed), file_system);
@@ -1362,7 +1365,10 @@
   priv->directory_monitor = g_file_monitor_directory (priv->folder_file, G_FILE_MONITOR_NONE, NULL, &error);
 
   if (error)
-    g_warning (error->message);
+    {
+      g_warning ("%s", error->message);
+      g_error_free (error);
+    }
   else
     g_signal_connect (priv->directory_monitor, "changed",
 		      G_CALLBACK (directory_monitor_changed), object);



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