Commit 897dbea6 authored by Dan Carpenter's avatar Dan Carpenter Committed by Maxime Ripard

drm/v3d: Fix double free in v3d_submit_cl_ioctl()

Originally this error path used to leak "bin" but then we accidentally
applied two separate commits to fix it and ended up with a double free.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20201026094905.GA1634423@mwanda
parent e3190b5e
...@@ -568,7 +568,6 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data, ...@@ -568,7 +568,6 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data,
ret = v3d_job_init(v3d, file_priv, &bin->base, ret = v3d_job_init(v3d, file_priv, &bin->base,
v3d_job_free, args->in_sync_bcl); v3d_job_free, args->in_sync_bcl);
if (ret) { if (ret) {
kfree(bin);
v3d_job_put(&render->base); v3d_job_put(&render->base);
kfree(bin); kfree(bin);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment