[nautilus/fixing-leaks] general: Fix some leaks catched by Valgrind
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/fixing-leaks] general: Fix some leaks catched by Valgrind
- Date: Mon, 24 Sep 2018 10:51:00 +0000 (UTC)
commit d3b4555bb9f45040a1959774f6a01f01587b876f
Author: Carlos Soriano <csoriano redhat com>
Date: Mon Sep 24 12:50:03 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 ++++--
2 files changed, 5 insertions(+), 3 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]