summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-07-22 06:00:46 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-07-22 06:00:46 +0000
commit211d4df89cc385f3855cf96be1a495537831ee35 (patch)
treec998b710fafabc0cda8d70aa89e2fae61b267d6c /sys
parentc66cdf9556760d0241397ac53b9bb2d154e291a8 (diff)
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
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/i915/display/intel_dp_mst.c1
1 files changed, 1 insertions, 0 deletions
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;
}