[lvc-project] [PATCH] media: davinci: vpif: Fix memory leak in probe error path
Johan Hovold
johan at kernel.org
Mon Apr 14 10:56:30 MSK 2025
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
More information about the lvc-project
mailing list