]> git.hungrycats.org Git - linux/commit
powerpc/powernv: Free name on error in opal_event_init()
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 20 Sep 2024 09:35:20 +0000 (19:35 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 15 Oct 2024 22:26:50 +0000 (09:26 +1100)
commitcf8989d20d64ad702a6210c11a0347ebf3852aa7
tree4c7c4351f7d1ac4d018b61d18ef188748cd51ba6
parent8956c582ac6b1693a351230179f898979dd00bdf
powerpc/powernv: Free name on error in opal_event_init()

In opal_event_init() if request_irq() fails name is not freed, leading
to a memory leak. The code only runs at boot time, there's no way for a
user to trigger it, so there's no security impact.

Fix the leak by freeing name in the error path.

Reported-by: 2639161967 <2639161967@qq.com>
Closes: https://lore.kernel.org/linuxppc-dev/87wmjp3wig.fsf@mail.lhotse
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/20240920093520.67997-1-mpe@ellerman.id.au
arch/powerpc/platforms/powernv/opal-irqchip.c