[lvc-project] [PATCH v3] media: davinci: vpif: Fix memory leak in probe error path
Johan Hovold
johan at kernel.org
Thu Apr 17 10:05:36 MSK 2025
On Wed, Apr 16, 2025 at 11:51:19PM +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.
>
> Adjust error path handling to fix the leak.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 43acb728bbc4 ("media: davinci: vpif: fix use-after-free on driver unbind")
> Signed-off-by: Dmitry Nikiforov <Dm1tryNk at yandex.ru>
> ---
> v2: also fix of_graph_get_endpoint_by_regs() error path.
> v3: Rework incorrect error handling added in v2.
> Also fix missing platform_device_del() in another error path (Johan Hovold).
Thanks for the update. Looks good:
Reviewed-by: Johan Hovold <johan at kernel.org>
More information about the lvc-project
mailing list