mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git
synced 2025-09-27 17:32:00 +10:00
regmap-irq: Add missing kfree()
commit32ffed055d
upstream. Add kfree() for "d->main_status_buf" to the error-handling path to prevent a memory leak. Fixes:a2d21848d9
("regmap: regmap-irq: Add main status register support") Cc: stable@vger.kernel.org # v5.1+ Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> Link: https://patch.msgid.link/20250205004343.14413-1-jiashengjiangcool@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
40a35d14f3
commit
78be8f779b
@ -904,6 +904,7 @@ err_alloc:
|
||||
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->virt_buf) {
|
||||
@ -979,6 +980,7 @@ void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
|
||||
kfree(d->wake_buf);
|
||||
kfree(d->mask_buf_def);
|
||||
kfree(d->mask_buf);
|
||||
kfree(d->main_status_buf);
|
||||
kfree(d->status_reg_buf);
|
||||
kfree(d->status_buf);
|
||||
kfree(d);
|
||||
|
Loading…
Reference in New Issue
Block a user