[gvfs/gnome-2-28] Don't leak mount job operation



commit c8729e19a95428f508dae66a717bf177d8ba7adb
Author: Hans de Goede <jwrdegoede fedoraproject org>
Date:   Tue Jan 12 13:36:11 2010 +0100

    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
    (cherry picked from commit 438628c6794fc8f9203fbd99b534371a1aa6d11a)

 daemon/gvfsdaemon.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gvfsdaemon.c b/daemon/gvfsdaemon.c
index 15fffc7..909e1d7 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);
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]