]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Fix a memory leak in an error handling path in 'hclge_handle_error_info_log()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 20 Jun 2021 09:49:40 +0000 (11:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Jun 2021 21:30:15 +0000 (14:30 -0700)
commit3ce68da831eb4b770ab3648673118b006277a34f
tree57d3f4a8fea2eb0bdf3de4f587f5162e3a4f832b
parente51d7dda0319a1a30c20b2f03bab68305e98c3a2
net: hns3: Fix a memory leak in an error handling path in 'hclge_handle_error_info_log()'

If this 'kzalloc()' fails we must free some resources as in all the other
error handling paths of this function.

Fixes: e145213d4cdc ("net: hns3: add the RAS compatibility adaptation solution")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Jiaran Zhang <zhangjiaran@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c