From: YueHaibing yuehaibing@huawei.com
mainline inclusion from mainline-v6.2-rc1 commit a068d33e542f5d5be2e5de3cf1122c4347d3e2af category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8LOJU
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i...
--------------------------------
eeprom_ptrs should be freed before returned.
Fixes: 049fe5365324 ("net: txgbe: Add operations to interact with firmware") Signed-off-by: YueHaibing yuehaibing@huawei.com Signed-off-by: Jakub Kicinski kuba@kernel.org Signed-off-by: Dapeng Yu dapeng.yu@windriver.com --- v2: * remove lines from commit message to pass format check
drivers/net/ethernet/netswift/txgbe/txgbe_hw.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/netswift/txgbe/txgbe_hw.c b/drivers/net/ethernet/netswift/txgbe/txgbe_hw.c index 55f98a55f4b6..929f03c42132 100644 --- a/drivers/net/ethernet/netswift/txgbe/txgbe_hw.c +++ b/drivers/net/ethernet/netswift/txgbe/txgbe_hw.c @@ -6925,6 +6925,7 @@ s32 txgbe_calc_eeprom_checksum(struct txgbe_hw *hw) eeprom_ptrs); if (status) { DEBUGOUT("Failed to read EEPROM image\n"); + kvfree(eeprom_ptrs); return status; } local_buffer = eeprom_ptrs;
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/3228 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/G...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/3228 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/G...