Commit 0584674d authored by Wei Yongjun's avatar Wei Yongjun Committed by Jani Nikula
Browse files

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: f26ae6a6 ("drm/i915: SRM revocation check for HDCP1.4 and 2.2")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190704104534.12508-1-weiyongjun1@huawei.com


(cherry picked from commit de70fdd7)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent e21a712a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -536,7 +536,8 @@ int intel_hdcp_auth_downstream(struct intel_connector *connector)

	if (drm_hdcp_check_ksvs_revoked(dev, ksv_fifo, num_downstream)) {
		DRM_ERROR("Revoked Ksv(s) in ksv_fifo\n");
		return -EPERM;
		ret = -EPERM;
		goto err;
	}

	/*