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>
This commit is contained in:
Jonas Ådahl 2020-10-09 17:30:05 +02:00
parent 431bde921c
commit d5cbbb2733

View File

@ -96,8 +96,8 @@ meta_backend_native_finalize (GObject *object)
if (native->udev_device_added_handler_id) if (native->udev_device_added_handler_id)
disconnect_udev_device_added_handler (native); disconnect_udev_device_added_handler (native);
g_clear_object (&native->udev);
g_clear_object (&native->kms); g_clear_object (&native->kms);
g_clear_object (&native->udev);
meta_launcher_free (native->launcher); meta_launcher_free (native->launcher);
G_OBJECT_CLASS (meta_backend_native_parent_class)->finalize (object); G_OBJECT_CLASS (meta_backend_native_parent_class)->finalize (object);