summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <jwrdegoede@fedoraproject.org>2010-01-12 13:36:11 +0100
committerAlexander Larsson <alexl@redhat.com>2010-01-12 13:36:11 +0100
commit438628c6794fc8f9203fbd99b534371a1aa6d11a (patch)
treea6769032e1f8858b2c3512742daf12dc8714ccdf
parent5f181d0e2c71719991c4bbfc6ca91e5438ad29e9 (diff)
downloadgvfs-438628c6794fc8f9203fbd99b534371a1aa6d11a.tar.gz
Don't leak mount job operation
gvfs <= 1.5.1 does not properly call the finalize function of backends, due to a missing unref call. This causes the cleanup functions of the libraries underlying the backends to not get called. In case of the gphoto2 backend, this causes the kernel driver for dual mode webcams (which have a kernel space webcam driver and a userspace stillcam driver), to not get re-attached to the device when then the gvfs mount gets unmounted. This patch fixes this by adding a g_object_unref (job) to g_vfs_daemon_initiate_mount, which is needed as g_vfs_daemon_queue_job takes a reference itself. https://bugzilla.gnome.org/show_bug.cgi?id=606194
-rw-r--r--daemon/gvfsdaemon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/daemon/gvfsdaemon.c b/daemon/gvfsdaemon.c
index 15fffc77..909e1d70 100644
--- a/daemon/gvfsdaemon.c
+++ b/daemon/gvfsdaemon.c
@@ -1081,6 +1081,7 @@ g_vfs_daemon_initiate_mount (GVfsDaemon *daemon,
job = g_vfs_job_mount_new (mount_spec, mount_source, is_automount, request, backend);
g_vfs_daemon_queue_job (daemon, job);
+ g_object_unref (job);
}
/**