From d5cbbb27339594dc9101f0f465bd113568bf332f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 9 Oct 2020 17:30:05 +0200 Subject: [PATCH] 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: --- 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 d38932bba..fee6f7601 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);