From: Johan Hovold <johan@kernel.org>
To: Dmitry Nikiforov <Dm1tryNk@yandex.ru>
Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@xs4all.nl>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: Re: [PATCH] media: davinci: vpif: Fix memory leak in probe error path
Date: Mon, 14 Apr 2025 09:56:30 +0200 [thread overview]
Message-ID: <Z_y_ru_M6gBL2Mn4@hovoldconsulting.com> (raw)
In-Reply-To: <20250411194818.11635-1-Dm1tryNk@yandex.ru>
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
prev parent reply other threads:[~2025-04-14 7:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 19:48 [PATCH] media: davinci: vpif: Fix memory leak in probe error path Dmitry Nikiforov
2025-04-14 7:56 ` Johan Hovold [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z_y_ru_M6gBL2Mn4@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=Dm1tryNk@yandex.ru \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=mchehab@kernel.org \
--cc=prabhakar.csengg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox