android_kernel_oneplus_msm8998/drivers/infiniband
Wenwen Wang bc68ba54a2 IB/mlx4: Fix memory leaks
[ Upstream commit 5c1baaa82cea2c815a5180ded402a7cd455d1810 ]

In mlx4_ib_alloc_pv_bufs(), 'tun_qp->tx_ring' is allocated through
kcalloc(). However, it is not always deallocated in the following execution
if an error occurs, leading to memory leaks. To fix this issue, free
'tun_qp->tx_ring' whenever an error occurs.

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Link: https://lore.kernel.org/r/1566159781-4642-1-git-send-email-wenwen@cs.uga.edu
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-09-10 10:29:48 +01:00
..
core RDMA: Directly cast the sockaddr union to sockaddr 2019-08-25 10:53:04 +02:00
hw IB/mlx4: Fix memory leaks 2019-09-10 10:29:48 +01:00
ulp RDMA/srp: Rework SCSI device reset handling 2019-03-23 08:44:17 +01:00
Kconfig RDMA/ucm: Mark UCM interface as BROKEN 2018-07-17 11:31:46 +02:00
Makefile