From: Markus Elfring Subject: Re: [PATCH] drm/v3d: Fix memory leak in v3d_submit_cl_ioctl Date: Tue, 22 Oct 2019 09:30:34 +0200 Message-ID: References: <20191021185250.26130-1-navid.emamdoost@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Navid Emamdoost , dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Navid Emamdoost , Kangjie Lu , Stephen McCamant , Daniel Vetter , David Airlie , Eric Anholt , Iago Toral Quiroga List-Id: dri-devel@lists.freedesktop.org > =E2=80=A6 >> +++ b/drivers/gpu/drm/v3d/v3d_gem.c >> @@ -557,13 +557,16 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void = *data, > =E2=80=A6 >> if (ret) { >> v3d_job_put(&render->base); >> + kfree(bin); > =E2=80=A6 > > Can it be helpful to move the added function call before the other > in this if branch (if you prefer to avoid the addition of a jump target = here)? I got into the mood to take another look at these implementation details. I suggest then to look at the commit 0d352a3a8a1f26168d09f7073e61bb4b328e3= bb9 ("drm/v3d: don't leak bin job if v3d_job_init fails." from 2019-09-18) once more. With which software versions did you perform your source code analysis? Regards, Markus