diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2015-11-10 14:39:55 +0300 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2015-11-11 09:40:59 +0100 |
commit | aa4d6175c9e94ba157e286e1c8c6fffdffdb48e9 (patch) | |
tree | b9ef40836840b4fab2179c818e8df1f0b7b114bc | |
parent | 5cecb844653a278c92e63c76885b5c4affef39c6 (diff) | |
download | gvfs-aa4d6175c9e94ba157e286e1c8c6fffdffdb48e9.tar.gz |
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>
-rw-r--r-- | 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 dd7fdf8a..600921ce 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, |