Skip to content

Commit 78be8f7

Browse files
Jiasheng Jianggregkh
authored andcommitted
regmap-irq: Add missing kfree()
commit 32ffed0 upstream. Add kfree() for "d->main_status_buf" to the error-handling path to prevent a memory leak. Fixes: a2d2184 ("regmap: regmap-irq: Add main status register support") Cc: [email protected] # v5.1+ Signed-off-by: Jiasheng Jiang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 40a35d1 commit 78be8f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/base/regmap/regmap-irq.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,7 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode,
904904
kfree(d->wake_buf);
905905
kfree(d->mask_buf_def);
906906
kfree(d->mask_buf);
907+
kfree(d->main_status_buf);
907908
kfree(d->status_buf);
908909
kfree(d->status_reg_buf);
909910
if (d->virt_buf) {
@@ -979,6 +980,7 @@ void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
979980
kfree(d->wake_buf);
980981
kfree(d->mask_buf_def);
981982
kfree(d->mask_buf);
983+
kfree(d->main_status_buf);
982984
kfree(d->status_reg_buf);
983985
kfree(d->status_buf);
984986
kfree(d);

0 commit comments

Comments
 (0)