On Mon, Sep 03, 2018 at 12:54:44PM +0530, Sharat Masetty wrote:
> This patch fixes a trivial leak when trying to create a submitqueue.
> 
> Signed-off-by: Sharat Masetty <smase...@codeaurora.org>

Doh. Thanks.

Reviewed-by: Jordan Crouse <jcro...@codeaurora.org>
> ---
>  drivers/gpu/drm/msm/msm_submitqueue.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/msm/msm_submitqueue.c 
> b/drivers/gpu/drm/msm/msm_submitqueue.c
> index 5115f75..325da44 100644
> --- a/drivers/gpu/drm/msm/msm_submitqueue.c
> +++ b/drivers/gpu/drm/msm/msm_submitqueue.c
> @@ -78,8 +78,10 @@ int msm_submitqueue_create(struct drm_device *drm, struct 
> msm_file_private *ctx,
>       queue->flags = flags;
>  
>       if (priv->gpu) {
> -             if (prio >= priv->gpu->nr_rings)
> +             if (prio >= priv->gpu->nr_rings) {
> +                     kfree(queue);
>                       return -EINVAL;
> +             }
>  
>               queue->prio = prio;
>       }
> -- 
> 1.9.1
> 

-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

Reply via email to