]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hfi1: Prevent memory leak in sdma_init
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Wed, 25 Sep 2019 14:45:42 +0000 (09:45 -0500)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 1 Oct 2019 14:34:55 +0000 (11:34 -0300)
commit51cbed7ff3c117aa19c417268429e2ae2eb9880d
tree43afb02fa92d6fe44cc7feb5be1a4d44fcd809df
parent399f889d5c8058797714be18546eddaddc60e4b7
RDMA/hfi1: Prevent memory leak in sdma_init

In sdma_init if rhashtable_init fails the allocated memory for
tmp_sdma_rht should be released.

Fixes: 112ff5772232 ("IB/hfi1: NULL pointer dereference when freeing rhashtable")
Link: https://lore.kernel.org/r/20190925144543.10141-1-navid.emamdoost@gmail.com
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/sdma.c