[nautilus/origin/wip/desktop-split-nofonclicts: 14/26] window: fix file leak
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/origin/wip/desktop-split-nofonclicts: 14/26] window: fix file leak
- Date: Tue, 12 Apr 2016 14:28:25 +0000 (UTC)
commit 573e79c86f8b7a9a5f4bb711474c3215b4550479
Author: Carlos Soriano <csoriano gnome org>
Date: Tue Apr 12 14:23:33 2016 +0200
window: fix file leak
src/nautilus-window.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 99a2d22..ff5212c 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -538,6 +538,7 @@ real_create_slot (NautilusWindow *window,
GFile *location)
{
NautilusFile *file = NULL;
+ NautilusWindowSlot *slot;
if (location) {
file = nautilus_file_get (location);
@@ -546,10 +547,14 @@ real_create_slot (NautilusWindow *window,
* to a different location if not.
*/
if (file && nautilus_file_is_other_locations (file)) {
- return NAUTILUS_WINDOW_SLOT (nautilus_other_locations_window_slot_new (window));
+ slot = NAUTILUS_WINDOW_SLOT (nautilus_other_locations_window_slot_new (window));
} else {
- return nautilus_window_slot_new (window);
+ slot = nautilus_window_slot_new (window);
}
+
+ nautilus_file_unref (file);
+
+ return slot;
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]