public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regmap-irq: Add missing kfree()
@ 2025-02-02 20:05 Jiasheng Jiang
  2025-02-03  6:37 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jiasheng Jiang @ 2025-02-02 20:05 UTC (permalink / raw)
  To: broonie, gregkh, rafael, dakr, mazziesaccount
  Cc: linux-kernel, stable, Jiasheng Jiang

Add kfree() for "d->main_status_buf" in the error-handling path to prevent
a memory leak.

Fixes: a2d21848d921 ("regmap: regmap-irq: Add main status register support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
---
 drivers/base/regmap/regmap-irq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 0bcd81389a29..b73ab3cda781 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -906,6 +906,7 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode,
 	kfree(d->wake_buf);
 	kfree(d->mask_buf_def);
 	kfree(d->mask_buf);
+	kfree(d->main_status_buf);
 	kfree(d->status_buf);
 	kfree(d->status_reg_buf);
 	if (d->config_buf) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-02-06 11:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-02 20:05 [PATCH] regmap-irq: Add missing kfree() Jiasheng Jiang
2025-02-03  6:37 ` Greg KH
2025-02-04  2:57   ` [PATCH v2] " Jiasheng Jiang
2025-02-04  8:33 ` [PATCH] " Matti Vaittinen
2025-02-05  0:43   ` [PATCH v3] " Jiasheng Jiang
2025-02-06 11:44     ` Mark Brown
2025-02-05  0:44   ` [PATCH] " Jiasheng Jiang
2025-02-06 11:44 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox