IB/hfi1: Fix memory leak in exception path in get_irq_affinity()
authorSebastian Sanchez <[email protected]>
Tue, 1 May 2018 12:36:13 +0000 (05:36 -0700)
committerDoug Ledford <[email protected]>
Thu, 3 May 2018 19:24:48 +0000 (15:24 -0400)
commit59482a14918b282ca2a98f38c69da5ebeb1107d2
tree582883c82be7b63ceb3126eaab16a96cfd0848cd
parente9777ad4399c26c70318c4945f94efac2ed95391
IB/hfi1: Fix memory leak in exception path in get_irq_affinity()

When IRQ affinity is set and the interrupt type is unknown, a cpu
mask allocated within the function is never freed. Fix this memory
leak by allocating memory within the scope where it is used.

Reviewed-by: Mike Marciniszyn <[email protected]>
Reviewed-by: Michael J. Ruhl <[email protected]>
Signed-off-by: Sebastian Sanchez <[email protected]>
Signed-off-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
drivers/infiniband/hw/hfi1/affinity.c