[nautilus] file-operations: fix GFile leak
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] file-operations: fix GFile leak
- Date: Fri, 24 Aug 2012 16:44:27 +0000 (UTC)
commit 21ae836048bc9c06ed28e1f28cd4d7c1d55a8980
Author: Pavel Vasin <rat4vier gmail com>
Date: Fri Aug 24 12:13:08 2012 +0400
file-operations: fix GFile leak
https://bugzilla.gnome.org/show_bug.cgi?id=682603
libnautilus-private/nautilus-file-operations.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index dcdd7ce..3796ffa 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -3816,7 +3816,7 @@ copy_file_progress_callback (goffset current_num_bytes,
static gboolean
test_dir_is_parent (GFile *child, GFile *root)
{
- GFile *f;
+ GFile *f, *tmp;
f = g_file_dup (child);
while (f) {
@@ -3824,7 +3824,9 @@ test_dir_is_parent (GFile *child, GFile *root)
g_object_unref (f);
return TRUE;
}
+ tmp = f;
f = g_file_get_parent (f);
+ g_object_unref (tmp);
}
if (f) {
g_object_unref (f);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]