From: jsg Date: Fri, 22 Jul 2022 06:00:45 +0000 (+0000) Subject: drm/i915: fix a possible refcount leak in intel_dp_add_mst_connector() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=76a1f421e7962ccb6a4531e8689dd614b567e7c9;p=openbsd drm/i915: fix a possible refcount leak in intel_dp_add_mst_connector() From Hangyu Hua 505114dda5bbfd07f4ce9a2df5b7d8ef5f2a1218 in linux 5.15.y/5.15.56 85144df9ff4652816448369de76897c57cbb1b93 in mainline linux --- diff --git a/sys/dev/pci/drm/i915/display/intel_dp_mst.c b/sys/dev/pci/drm/i915/display/intel_dp_mst.c index 8d13d7b26a2..2a20487effc 100644 --- a/sys/dev/pci/drm/i915/display/intel_dp_mst.c +++ b/sys/dev/pci/drm/i915/display/intel_dp_mst.c @@ -817,6 +817,7 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo ret = drm_connector_init(dev, connector, &intel_dp_mst_connector_funcs, DRM_MODE_CONNECTOR_DisplayPort); if (ret) { + drm_dp_mst_put_port_malloc(port); intel_connector_free(intel_connector); return NULL; }