]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Fix an error handling path in 'hclge_rss_init_hw()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 30 Sep 2017 05:34:34 +0000 (07:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Oct 2017 05:57:24 +0000 (22:57 -0700)
commitb465f44bd9f1f64a1a90f805e3b649a1a677a273
treea362ce35fcdd1d33e5d12ac99b920a04fc1f1483
parent85f0bdbf199c3382ebc7ff8b3eaac3417f25c7e4
net: hns3: Fix an error handling path in 'hclge_rss_init_hw()'

If this sanity check fails, we must free 'rss_indir'. Otherwise there is a
memory leak.
'goto err' as done in the other error handling paths to fix it.

Fixes: 575d84053c84 ("net: hns3: Fix for setting rss_size incorrectly")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c