]> git.baikalelectronics.ru Git - kernel.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)
commite75f86e14c9f1d27247c3e8f30bc8ecfbcaec261
tree08d2cc07c46e1d047a8afa6be7e7a85eda00a7ec
parentb5bdd52f8e53ec9091a735f3c6d58c1d516e9e6a
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: 4ce7b0507c02 ("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