gtk+ r21612 - in branches/gtk-2-14: . gtk



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

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

Modified:
   branches/gtk-2-14/ChangeLog
   branches/gtk-2-14/gtk/gtkfilesystem.c

Modified: branches/gtk-2-14/gtk/gtkfilesystem.c
==============================================================================
--- branches/gtk-2-14/gtk/gtkfilesystem.c	(original)
+++ branches/gtk-2-14/gtk/gtkfilesystem.c	Wed Oct  8 21:01:50 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]