Files
linux/drivers
Fan Guo 79eb4f02c2 RDMA/mad: Fix possible memory leak in ib_mad_post_receive_mads()
[ Upstream commit a17f4bed81 ]

If ib_dma_mapping_error() returns non-zero value,
ib_mad_post_receive_mads() will jump out of loops and return -ENOMEM
without freeing mad_priv. Fix this memory-leak problem by freeing mad_priv
in this case.

Fixes: 2c34e68f42 ("IB/mad: Check and handle potential DMA mapping errors")
Link: https://lore.kernel.org/r/20200612063824.180611-1-guofan5@huawei.com
Signed-off-by: Fan Guo <guofan5@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-30 15:38:42 -04:00
..
2020-06-30 15:38:31 -04:00
2020-01-04 13:39:51 +01:00
2019-05-14 19:19:34 +02:00
2020-05-27 16:42:02 +02:00
2018-12-21 14:11:36 +01:00
2018-11-13 11:17:02 -08:00
2018-10-03 17:01:42 -07:00
2020-06-30 15:38:25 -04:00
2020-02-28 15:42:33 +01:00