]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Fix memory leak in exception path in get_irq_affinity()
authorSebastian Sanchez <sebastian.sanchez@intel.com>
Tue, 1 May 2018 12:36:13 +0000 (05:36 -0700)
committerDoug Ledford <dledford@redhat.com>
Thu, 3 May 2018 19:24:48 +0000 (15:24 -0400)
commit8c2bfbe747f83bd81fb4eb3603d4bd3446d2d4f3
tree582883c82be7b63ceb3126eaab16a96cfd0848cd
parent048c237ccf80d7fce089f7f94cb9b85e24eabaaa
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 <mike.marciniszyn@intel.com>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/affinity.c