[nautilus] files-view: unref directory after calling _get_by_uri()
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] files-view: unref directory after calling _get_by_uri()
- Date: Thu, 28 Jul 2016 08:01:43 +0000 (UTC)
commit 26988024ac15b92b51557d4ce45f38fba982f4e8
Author: Ernestas Kulik <ernestask src gnome org>
Date: Tue Jul 26 12:49:05 2016 +0300
files-view: unref directory after calling _get_by_uri()
update_scripts_menu() and update_templates_menu() do not unref the
directories after calling nautilus_directory_get_by_uri(), which results
in leaks. This commit fixes that by adding calls to
nautilus_directory_unref().
https://bugzilla.gnome.org/show_bug.cgi?id=769182
src/nautilus-files-view.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index bf8fc5f..cbe8d2f 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -4953,6 +4953,8 @@ update_scripts_menu (NautilusFilesView *view)
g_object_unref (submenu);
}
+ nautilus_directory_unref (directory);
+
view->details->scripts_present = submenu != NULL;
}
@@ -5175,6 +5177,8 @@ update_templates_menu (NautilusFilesView *view)
g_object_unref (submenu);
}
+ nautilus_directory_unref (directory);
+
view->details->templates_present = submenu != NULL;
g_free (templates_directory_uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]