[nautilus/fixing-leaks: 37/37] general: Fix some leaks catched by Valgrind
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/fixing-leaks: 37/37] general: Fix some leaks catched by Valgrind
- Date: Mon, 24 Sep 2018 10:48:53 +0000 (UTC)
commit 2e592cbbf7ed94911e7d6373192c8b3abae6783c
Author: Carlos Soriano <csoriano redhat com>
Date: Fri Sep 7 12:38:43 2018 +0200
general: Fix some leaks catched by Valgrind
This is by just opening and closing the app, we will definitely have
more by regular usage...
src/nautilus-application.c | 2 +-
src/nautilus-files-view.c | 6 ++++--
src/nautilus-toolbar.c | 3 +--
3 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 3199caa6c..cceab8705 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -884,7 +884,7 @@ variant_set_mapping (const GValue *value,
return g_value_get_variant (value);
}
-static GActionEntry app_entries[] =
+const static GActionEntry app_entries[] =
{
{ "new-window", action_new_window, NULL, NULL, NULL },
{ "clone-window", action_clone_window, NULL, NULL, NULL },
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index ad326333a..efec3e662 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -7344,7 +7344,8 @@ real_update_actions_state (NautilusFilesView *view)
gboolean settings_show_delete_permanently;
gboolean settings_show_create_link;
GDriveStartStopType start_stop_type;
- GFile *current_location;
+ g_autoptr (GFile) current_location = NULL;
+ g_autofree gchar *current_uri = NULL;
gboolean current_directory_in_xdg_folders;
gboolean show_star;
gboolean show_unstar;
@@ -7680,7 +7681,8 @@ real_update_actions_state (NautilusFilesView *view)
* See https://gitlab.gnome.org/GNOME/nautilus/issues/243
*/
current_location = nautilus_file_get_location (nautilus_files_view_get_directory_as_file (view));
- current_directory_in_xdg_folders = eel_uri_is_in_xdg_dirs (g_file_get_uri (current_location));
+ current_uri = g_file_get_uri (current_location);
+ current_directory_in_xdg_folders = eel_uri_is_in_xdg_dirs (current_uri);
show_star = (selection != NULL) &&
(current_directory_in_xdg_folders || selection_contains_starred);
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index fb0d2d4c0..9810d7688 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -1250,8 +1250,7 @@ nautilus_toolbar_class_init (NautilusToolbarClass *klass)
GtkWidget *
nautilus_toolbar_new ()
{
- return g_object_new (NAUTILUS_TYPE_TOOLBAR,
- NULL);
+ return g_object_new (NAUTILUS_TYPE_TOOLBAR, NULL);
}
GtkWidget *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]