[gvfs] daemon: Don't leak mountable_name
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] daemon: Don't leak mountable_name
- Date: Wed, 11 Nov 2015 09:07:34 +0000 (UTC)
commit aa4d6175c9e94ba157e286e1c8c6fffdffdb48e9
Author: Dmitry Eremin-Solenikov <dbaryshkov gmail com>
Date: Tue Nov 10 14:39:55 2015 +0300
daemon: Don't leak mountable_name
If the daemon code allocates a unique mountable_name, later this string
is lost. Store and free it properly to remove the memory leak.
https://bugzilla.gnome.org/show_bug.cgi?id=757901
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov gmail com>
[oholy redhat com: commit message modification]
Signed-off-by: Ondrej Holy <oholy redhat com>
daemon/daemon-main.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/daemon/daemon-main.c b/daemon/daemon-main.c
index dd7fdf8..600921c 100644
--- a/daemon/daemon-main.c
+++ b/daemon/daemon-main.c
@@ -381,11 +381,11 @@ daemon_main (int argc,
name_owner_id = 0;
/* We want to own *some* name on the org.gtk.vfs.* namespace so that
filtering for us works from a sandbox */
- if (mountable_name == NULL)
- mountable_name = g_strdup_printf ("org.gtk.vfs.mountpoint_%d", getpid ());
+ if (data->mountable_name == NULL)
+ data->mountable_name = g_strdup_printf ("org.gtk.vfs.mountpoint_%d", getpid ());
name_owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
- mountable_name,
+ data->mountable_name,
G_BUS_NAME_OWNER_FLAGS_NONE,
NULL,
on_name_acquired,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]