RDMA/i40iw: Fix potential use after free
authorPan Bian <bianpan2016@163.com>
Wed, 6 Nov 2019 06:44:11 +0000 (14:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 11:12:29 +0000 (13:12 +0200)
commit11ce66d66783ad0ac57f12521602bf5622d359d3
tree9d253374dc5f8522e4b9a154e2c38e5d26f5cb4b
parent4de642e680b16aeb8820c2587cc7afa29cd33c04
RDMA/i40iw: Fix potential use after free

[ Upstream commit da046d5f895fca18d63b15ac8faebd5bf784e23a ]

Release variable dst after logging dst->error to avoid possible use after
free.

Link: https://lore.kernel.org/r/1573022651-37171-1-git-send-email-bianpan2016@163.com
Signed-off-by: Pan Bian <bianpan2016@163.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/i40iw/i40iw_cm.c