Skip to content
Commit 29cd13cf authored by Navid Emamdoost's avatar Navid Emamdoost Committed by Daniel Vetter
Browse files

drm/v3d: Fix memory leak in v3d_submit_cl_ioctl



In the impelementation of v3d_submit_cl_ioctl() there are two memory
leaks. One is when allocation for bin fails, and the other is when bin
initialization fails. If kcalloc fails to allocate memory for bin then
render->base should be put. Also, if v3d_job_init() fails to initialize
bin->base then allocated memory for bin should be released.

Fixes: a783a09e ("drm/v3d: Refactor job management.")
Signed-off-by: default avatarNavid Emamdoost <navid.emamdoost@gmail.com>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20191021185250.26130-1-navid.emamdoost@gmail.com
parent 4cad2a57
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment