[PATCH] Don't leak mountable_name in daemon
- From: Dmitry Eremin-Solenikov <dbaryshkov gmail com>
- To: gvfs-list gnome org
- Subject: [PATCH] Don't leak mountable_name in daemon
- Date: Tue, 10 Nov 2015 14:41:01 +0300
If the daemon code allocates a unique mountable_name, later this string
is lost. Store and free it properly to remove the memory leak.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov gmail com>
---
daemon/daemon-main.c | 6 +++---
1 file 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,
--
2.6.2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]