diff options
| author | Fan Guo <[email protected]> | 2020-06-12 06:38:24 +0000 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2020-06-19 12:23:30 +0000 |
| commit | a17f4bed811c60712d8131883cdba11a105d0161 (patch) | |
| tree | 230426217dfa3e6f949c573726742bfb57f0e3eb /drivers/infiniband/core/counters.c | |
| parent | RDMA/mlx5: Fix integrity enabled QP creation (diff) | |
| download | kernel-a17f4bed811c60712d8131883cdba11a105d0161.tar.gz kernel-a17f4bed811c60712d8131883cdba11a105d0161.zip | |
RDMA/mad: Fix possible memory leak in ib_mad_post_receive_mads()
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/[email protected]
Signed-off-by: Fan Guo <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'drivers/infiniband/core/counters.c')
0 files changed, 0 insertions, 0 deletions
