diff options
author | Christian Persch <chpe@src.gnome.org> | 2008-10-08 21:00:56 +0000 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2008-10-08 21:00:56 +0000 |
commit | 941abf87804378aceba145cea658497b220c48f9 (patch) | |
tree | ca6857e49813a4736b5346fd2eab2b0749667974 /gtk/gtkfilesystem.c | |
parent | 28e58945d70f8ad6a27d1fec7c2fa34d97c71aac (diff) | |
download | gtk+-941abf87804378aceba145cea658497b220c48f9.tar.gz |
Bug 554702 – gtkfilesystem leaks GError
Also fixes some "format not a string literal and no format arguments"
warnings.
svn path=/trunk/; revision=21611
Diffstat (limited to 'gtk/gtkfilesystem.c')
-rw-r--r-- | gtk/gtkfilesystem.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gtk/gtkfilesystem.c b/gtk/gtkfilesystem.c index 0bd79b08f6..2b2d44a3ba 100644 --- a/gtk/gtkfilesystem.c +++ b/gtk/gtkfilesystem.c @@ -323,7 +323,7 @@ save_bookmarks (GFile *bookmarks_file, NULL, FALSE, 0, NULL, NULL, &error)) { - g_critical (error->message); + g_critical ("%s", error->message); g_error_free (error); } @@ -531,7 +531,10 @@ _gtk_file_system_init (GtkFileSystem *file_system) 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 @@ gtk_folder_constructed (GObject *object) 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); |