[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200922072829.1167244-1-zhengbin13@huawei.com>
Date: Tue, 22 Sep 2020 15:28:29 +0800
From: Zheng Bin <zhengbin13@...wei.com>
To: <eric@...olt.net>, <airlied@...ux.ie>, <daniel@...ll.ch>,
<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
CC: <yi.zhang@...wei.com>, <zhengbin13@...wei.com>
Subject: [PATCH -next] drm/v3d: fix double kfree in v3d_submit_cl_ioctl()
If v3d_job_init() returns with an error, the storage
addressed by 'bin' is freed a second time. This patch fixes that.
Fixes: 0d352a3a8a1f ("drm/v3d: don't leak bin job if v3d_job_init fails.")
Fixes: 29cd13cfd762 ("drm/v3d: Fix memory leak in v3d_submit_cl_ioctl")
Signed-off-by: Zheng Bin <zhengbin13@...wei.com>
---
drivers/gpu/drm/v3d/v3d_gem.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
index 915f8bfdb58c..182c586525eb 100644
--- a/drivers/gpu/drm/v3d/v3d_gem.c
+++ b/drivers/gpu/drm/v3d/v3d_gem.c
@@ -568,7 +568,6 @@ 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);
kfree(bin);
return ret;
--
2.25.4
Powered by blists - more mailing lists