[gvfs/wip/oholy/dav-crashes] dav: Fix crashes caused by extra unref




commit 2b5e3453ee0ab504eeecb8dbe76015e98ccbfcfb
Author: Ondrej Holy <oholy redhat com>
Date:   Wed Mar 23 16:23:49 2022 +0100

    dav: Fix crashes caused by extra unref
    
    The `mount_base` uri is unreffed twice. First time over the local `mount_base`
    pointer and for the second time over the `G_VFS_BACKEND_HTTP (backend)->mount_base`
    pointer. This leads to `SIGABRT` from the `__pthread_kill_implementation`
    function. Let's remove that extra unref to fix this crashes.
    
    Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2066717

 daemon/gvfsbackenddav.c | 1 -
 1 file changed, 1 deletion(-)
---
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c
index 559b8657..f9d10a40 100644
--- a/daemon/gvfsbackenddav.c
+++ b/daemon/gvfsbackenddav.c
@@ -2224,7 +2224,6 @@ do_mount (GVfsBackend  *backend,
   tmp = mount_base;
   mount_base = dav_uri_dup_with (mount_base, last_good_path, NULL);
   g_uri_unref (tmp);
-  g_clear_pointer (&G_VFS_BACKEND_HTTP (backend)->mount_base, g_uri_unref);
   G_VFS_BACKEND_HTTP (backend)->mount_base = mount_base;
   g_free (last_good_path);
 


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