Skip to content
Commit 5c1baaa8 authored by Wenwen Wang's avatar Wenwen Wang Committed by Doug Ledford
Browse files

IB/mlx4: Fix memory leaks



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: default avatarWenwen Wang <wenwen@cs.uga.edu>
Acked-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Link: https://lore.kernel.org/r/1566159781-4642-1-git-send-email-wenwen@cs.uga.edu


Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent a7bfb93f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment