wayland/drm-lease: Fix reference count cycle
MetaWaylandDrmLeaseDevice and MetaWaylandDrmLeaseConnector hold a
reference to each other.
In both cases, the reference count was increased. Do not increase the
reference count when lease_connector->lease_device is stored to break
the reference count cycle.
Fixes: fb08a597e1
("wayland/drm-lease: Advertize initial connectors")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4031>
This commit is contained in:
parent
86c9d602cd
commit
9c536939a1
1 changed files with 1 additions and 2 deletions
|
@ -114,7 +114,6 @@ meta_wayland_drm_lease_connector_free (MetaWaylandDrmLeaseConnector *lease_conne
|
|||
{
|
||||
g_object_unref (lease_connector->kms_connector);
|
||||
g_free (lease_connector->description);
|
||||
meta_wayland_drm_lease_device_release (lease_connector->lease_device);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -400,7 +399,7 @@ meta_wayland_drm_lease_connector_new (MetaWaylandDrmLeaseDevice *lease_device,
|
|||
MetaWaylandDrmLeaseConnector *lease_connector;
|
||||
|
||||
lease_connector = g_rc_box_new0 (MetaWaylandDrmLeaseConnector);
|
||||
lease_connector->lease_device = g_rc_box_acquire (lease_device);
|
||||
lease_connector->lease_device = lease_device;
|
||||
lease_connector->kms_connector = g_object_ref (kms_connector);
|
||||
lease_connector->description = get_connector_description (kms_connector);
|
||||
|
||||
|
|
Loading…
Reference in a new issue