Skip to content

Commit 0584674

Browse files
Wei Yongjunjnikula
authored andcommitted
drm/i915: fix possible memory leak in intel_hdcp_auth_downstream()
'ksv_fifo' is malloced in intel_hdcp_auth_downstream() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: f26ae6a ("drm/i915: SRM revocation check for HDCP1.4 and 2.2") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190704104534.12508-1-weiyongjun1@huawei.com (cherry picked from commit de70fdd) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
1 parent e21a712 commit 0584674

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/gpu/drm/i915/display/intel_hdcp.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,8 @@ int intel_hdcp_auth_downstream(struct intel_connector *connector)
536536

537537
if (drm_hdcp_check_ksvs_revoked(dev, ksv_fifo, num_downstream)) {
538538
DRM_ERROR("Revoked Ksv(s) in ksv_fifo\n");
539-
return -EPERM;
539+
ret = -EPERM;
540+
goto err;
540541
}
541542

542543
/*

0 commit comments

Comments
 (0)