[nautilus/wip/gbsneto/memleaks: 1/7] file: fix memory leak in nautilus_file_is_remote
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/gbsneto/memleaks: 1/7] file: fix memory leak in nautilus_file_is_remote
- Date: Tue, 23 Aug 2016 23:32:41 +0000 (UTC)
commit b59da8777959d3964f2d9d0b74f3004c186bd91d
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Aug 23 19:07:58 2016 -0300
file: fix memory leak in nautilus_file_is_remote
https://bugzilla.gnome.org/show_bug.cgi?id=770306
src/nautilus-file.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index 60e2f9b..243ebf8 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -7078,13 +7078,17 @@ static const gchar * const remote_types[] = {
gboolean
nautilus_file_is_remote (NautilusFile *file)
{
+ gboolean is_remote;
char *filesystem_type;
g_assert (NAUTILUS_IS_FILE (file));
filesystem_type = nautilus_file_get_filesystem_type (file);
+ is_remote = filesystem_type != NULL && g_strv_contains (remote_types, filesystem_type);
- return filesystem_type != NULL && g_strv_contains (remote_types, filesystem_type);
+ g_free (filesystem_type);
+
+ return is_remote;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]