Files
linux/drivers/infiniband/core
Fan Guo ef092fd81b 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>
2023-05-16 08:21:33 +09:00
..
2015-10-08 11:09:10 +01:00
2015-06-12 14:49:18 -04:00
2015-05-05 13:21:27 -04:00
2016-03-03 10:20:25 -05:00
2023-05-15 17:03:10 +09:00
2016-06-06 19:36:21 -04:00
2016-01-19 15:25:45 -05:00
2008-07-14 23:48:44 -07:00
2016-05-13 13:37:18 -04:00
2016-03-03 10:20:25 -05:00
2023-05-15 09:15:19 +09:00
2023-05-15 09:15:19 +09:00
2016-03-03 10:20:25 -05:00
2023-05-15 09:57:46 +09:00