[nautilus] nautilus-view: fix memory leak
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] nautilus-view: fix memory leak
- Date: Sat, 24 Jan 2015 12:29:13 +0000 (UTC)
commit c9b80ab3847118e88b14ffa0e3023e73bf633031
Author: Carlos Soriano <csoriano gnome org>
Date: Sat Jan 24 13:27:43 2015 +0100
nautilus-view: fix memory leak
src/nautilus-view.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index 6bfd9a5..04374c8 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -4244,6 +4244,7 @@ update_directory_in_scripts_menu (NautilusView *view,
NautilusFile *file;
NautilusDirectory *dir;
char *uri;
+ gchar *file_name;
int num;
g_return_val_if_fail (NAUTILUS_IS_VIEW (view), NULL);
@@ -4269,12 +4270,14 @@ update_directory_in_scripts_menu (NautilusView *view,
children_menu = update_directory_in_scripts_menu (view, dir);
if (children_menu != NULL) {
- menu_item = g_menu_item_new_submenu (nautilus_file_get_display_name
(file),
+ file_name = nautilus_file_get_display_name (file);
+ menu_item = g_menu_item_new_submenu (file_name,
G_MENU_MODEL (children_menu));
g_menu_append_item (menu, menu_item);
any_scripts = TRUE;
g_object_unref (menu_item);
g_object_unref (children_menu);
+ g_free (file_name);
}
nautilus_directory_unref (dir);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]