]> asedeno.scripts.mit.edu Git - linux.git/commit
RDMA/hns: Prevent memory leaks of eq->buf_list
authorLijun Ou <oulijun@huawei.com>
Sat, 26 Oct 2019 06:56:35 +0000 (14:56 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 28 Oct 2019 18:06:38 +0000 (15:06 -0300)
commitb681a0529968d2261aa15d7a1e78801b2c06bb07
tree08d2cc07c46e1d047a8afa6be7e7a85eda00a7ec
parentd4934f45693651ea15357dd6c7c36be28b6da884
RDMA/hns: Prevent memory leaks of eq->buf_list

eq->buf_list->buf and eq->buf_list should also be freed when eqe_hop_num
is set to 0, or there will be memory leaks.

Fixes: a5073d6054f7 ("RDMA/hns: Add eq support of hip08")
Link: https://lore.kernel.org/r/1572072995-11277-3-git-send-email-liweihang@hisilicon.com
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Weihang Li <liweihang@hisilicon.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c