From: Andy Shevchenko <andy@kernel.org>
To: Haoxiang Li <haoxiang_li2024@163.com>
Cc: geert@linux-m68k.org, u.kleine-koenig@pengutronix.de,
erick.archer@outlook.com, ojeda@kernel.org, w@1wt.eu,
poeschel@lemonage.de, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v3] auxdisplay: hd44780: Fix a potential memory leak in hd44780.c
Date: Wed, 26 Feb 2025 15:27:32 +0200 [thread overview]
Message-ID: <Z78WxDiEIaYSaQfz@smile.fi.intel.com> (raw)
In-Reply-To: <20250226101213.3593835-1-haoxiang_li2024@163.com>
On Wed, Feb 26, 2025 at 06:12:13PM +0800, Haoxiang Li wrote:
> At the 'fail2' label in hd44780_probe(), the 'lcd' variable is
> freed via kfree(), but this does not actually release the memory
> allocated by charlcd_alloc(), as that memory is a container for lcd.
> As a result, a memory leak occurs. Replace kfree() with charlcd_free()
> to fix a potential memory leak.
> Same replacement is done in hd44780_remove().
The v2 was already applied.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2025-02-26 13:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 10:12 [PATCH v3] auxdisplay: hd44780: Fix a potential memory leak in hd44780.c Haoxiang Li
2025-02-26 13:27 ` Andy Shevchenko [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=Z78WxDiEIaYSaQfz@smile.fi.intel.com \
--to=andy@kernel.org \
--cc=erick.archer@outlook.com \
--cc=geert@linux-m68k.org \
--cc=haoxiang_li2024@163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=poeschel@lemonage.de \
--cc=stable@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=w@1wt.eu \
/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