diff options
| author | Fan Guo <guofan5@huawei.com> | 2020-06-12 14:38:24 +0800 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2020-06-29 20:08:01 -0400 |
| commit | 55344d5fdac029410ab0c1d947c905983bf47ad8 (patch) | |
| tree | fd1fe269779b22d396adeffb22d4b68fb742b6a4 /scripts/stackusage | |
| parent | 8da5b2305f6244184f0debde4ff3029788f27228 (diff) | |
RDMA/mad: Fix possible memory leak in ib_mad_post_receive_mads()
[ Upstream commit a17f4bed811c60712d8131883cdba11a105d0161 ]
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: 2c34e68f4261 ("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>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions
