diff options
author | Iago Toral Quiroga <itoral@igalia.com> | 2019-09-16 10:11:25 +0300 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2019-09-18 20:30:44 +0300 |
commit | 0d352a3a8a1f26168d09f7073e61bb4b328e3bb9 (patch) | |
tree | 6ead80abea5a4075568c1ab56fd05c0da6c79c08 /drivers/gpu/drm/v3d | |
parent | 69b22f51e6644b6592087fe157537dd5f68e30bb (diff) | |
download | linux-0d352a3a8a1f26168d09f7073e61bb4b328e3bb9.tar.xz |
drm/v3d: don't leak bin job if v3d_job_init fails.
If the initialization of the job fails we need to kfree() it
before returning.
Signed-off-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190916071125.5255-1-itoral@igalia.com
Fixes: a783a09ee76d ("drm/v3d: Refactor job management.")
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/v3d')
-rw-r--r-- | drivers/gpu/drm/v3d/v3d_gem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c index 5d80507b539b..fb32cda18ffe 100644 --- a/drivers/gpu/drm/v3d/v3d_gem.c +++ b/drivers/gpu/drm/v3d/v3d_gem.c @@ -563,6 +563,7 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data, ret = v3d_job_init(v3d, file_priv, &bin->base, v3d_job_free, args->in_sync_bcl); if (ret) { + kfree(bin); v3d_job_put(&render->base); return ret; } |