[mutter] backends/native: Destruct udev after kms



commit d5cbbb27339594dc9101f0f465bd113568bf332f
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri Oct 9 17:30:05 2020 +0200

    backends/native: Destruct udev after kms
    
    MetaKms is a user of MetaUdev, so destroy MetaUdev later than MetaKms,
    to avoid use-after-free.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1640>

 src/backends/native/meta-backend-native.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
index d38932bba0..fee6f76011 100644
--- a/src/backends/native/meta-backend-native.c
+++ b/src/backends/native/meta-backend-native.c
@@ -96,8 +96,8 @@ meta_backend_native_finalize (GObject *object)
   if (native->udev_device_added_handler_id)
     disconnect_udev_device_added_handler (native);
 
-  g_clear_object (&native->udev);
   g_clear_object (&native->kms);
+  g_clear_object (&native->udev);
   meta_launcher_free (native->launcher);
 
   G_OBJECT_CLASS (meta_backend_native_parent_class)->finalize (object);


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