mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
irqchip/gic-v3-its: Fix memleak in its_probe_one()
Fix collection leak when its_init_domain() failed in its_probe_one().
Fixes: 4c21f3c26e ("irqchip: GICv3: ITS: DT probing and initialization")
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Radu Rendec <radu@rendec.net>
Link: https://patch.msgid.link/20260702033050.1583-2-shikemeng@huaweicloud.com
This commit is contained in:
parent
4c4985305d
commit
1efffab6fe
|
|
@ -5322,7 +5322,7 @@ static int __init its_probe_one(struct its_node *its)
|
|||
|
||||
err = its_init_domain(its);
|
||||
if (err)
|
||||
goto out_free_tables;
|
||||
goto out_free_collection;
|
||||
|
||||
raw_spin_lock(&its_lock);
|
||||
list_add(&its->entry, &its_nodes);
|
||||
|
|
@ -5330,6 +5330,8 @@ static int __init its_probe_one(struct its_node *its)
|
|||
|
||||
return 0;
|
||||
|
||||
out_free_collection:
|
||||
kfree(its->collections);
|
||||
out_free_tables:
|
||||
its_free_tables(its);
|
||||
out_free_cmd:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user