backends/native/backend-native: Free the device path when stealing the device

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3788>
This commit is contained in:
Marco Trevisan (Treviño) 2024-05-29 20:42:39 +02:00 committed by Marge Bot
parent ce1dd40f7b
commit c2cc26b370

View File

@ -974,10 +974,11 @@ meta_backend_native_take_render_device (MetaBackendNative *backend_native,
GError **error)
{
MetaRenderDevice *render_device;
g_autofree char *stolen_device_path = NULL;
if (g_hash_table_steal_extended (backend_native->startup_render_devices,
device_path,
NULL,
(gpointer *) &stolen_device_path,
(gpointer *) &render_device))
{
return render_device;