[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z_y_ru_M6gBL2Mn4@hovoldconsulting.com>
Date: Mon, 14 Apr 2025 09:56:30 +0200
From: Johan Hovold <johan@...nel.org>
To: Dmitry Nikiforov <Dm1tryNk@...dex.ru>
Cc: "Lad, Prabhakar" <prabhakar.csengg@...il.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Hans Verkuil <hverkuil@...all.nl>, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, lvc-project@...uxtesting.org
Subject: Re: [PATCH] media: davinci: vpif: Fix memory leak in probe error path
On Fri, Apr 11, 2025 at 10:48:17PM +0300, Dmitry Nikiforov wrote:
> If an error occurs during the initialization of `pdev_display`,
> the allocated platform device `pdev_capture` is not released properly,
> leading to a memory leak.
>
> Fix this by adding `platform_device_del(pdev_capture)` in the error path.
Good catch, but you should fix up the error path above this one
(kzalloc) as part of this patch as well.
Johan
Powered by blists - more mailing lists