drm/v3d: don't leak bin job if v3d_job_init fails.
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- drivers/gpu/drm/v3d/v3d_gem.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/v3d/v3d_gem.c +1 -0
@@ -566,6 +566,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; }
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Eric Anholt
AppliedQuoted 4 lines · Iago Toral Quiroga
If the initialization of the job fails we need to
kfree()it before returning.Signed-off-by Iago Toral Quiroga <[email protected]>
Applied to drm-misc-next with a fixes tag for the commit that introduced the bug. Thanks!
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel