]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-pf: Fix potential memory leak in otx2_init_tc()
authorZiyang Xuan <william.xuanziyang@huawei.com>
Fri, 2 Dec 2022 11:04:30 +0000 (19:04 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Dec 2022 11:05:05 +0000 (11:05 +0000)
commitbc04994b8ed8112357bc217e4e45adf8f6c00a60
tree213e06c2210322f5215d0b49b78f249b76124500
parent8be2a8bdd8c09dd6e832c61f468a201c9b7df5b0
octeontx2-pf: Fix potential memory leak in otx2_init_tc()

In otx2_init_tc(), if rhashtable_init() failed, it does not free
tc->tc_entries_bitmap which is allocated in otx2_tc_alloc_ent_bitmap().

Fixes: 367e0fce3e2d ("octeontx2-pf: Unify flow management variables")
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c