[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87k1bxmbo0.fsf@intel.com>
Date: Thu, 01 Aug 2019 13:18:23 +0300
From: Jani Nikula <jani.nikula@...ux.intel.com>
To: Wei Yongjun <weiyongjun1@...wei.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>, Sean Paul <sean@...rly.run>
Cc: Wei Yongjun <weiyongjun1@...wei.com>,
intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH -next] drm/i915: fix possible memory leak in intel_hdcp_auth_downstream()
On Thu, 04 Jul 2019, Wei Yongjun <weiyongjun1@...wei.com> wrote:
> '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.
Thanks for the patch, sorry for the delay, pushed to
drm-intel-next-queued.
BR,
Jani.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
> ---
> drivers/gpu/drm/i915/display/intel_hdcp.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index bc3a94d491c4..27bd7276a82d 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -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;
> }
>
> /*
>
>
>
--
Jani Nikula, Intel Open Source Graphics Center
Powered by blists - more mailing lists