]> git.ipfire.org Git - thirdparty/openwrt.git/commit
kernel: mtk_eth_soc: fix memory leak in downstream patch 21821/head
authorDaniel Golle <daniel@makrotopia.org>
Fri, 30 Jan 2026 14:31:36 +0000 (14:31 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 5 Feb 2026 02:56:45 +0000 (02:56 +0000)
commita3821c7798281860605dcde9d5572641d9fd1f27
treefd704a51bc27b54e3338202600e129f041bf106a
parent06b5e42277838eef4e1d08f553684b8f1d288bd3
kernel: mtk_eth_soc: fix memory leak in downstream patch

Bc-bocun Chen of MediaTek has discovered a memory leak in the error path
in our downstream patch for mtk_eth_soc which adds support for the 10G
PCS and PHY paths of the MT7988 SoC.
Fix this by freeing the at this point already allocated netdev resources
before returning the error.

Fixes: 4cb6bd9a6d ("mediatek: switch to pending XFI 10G Ethernet drivers")
Reported-by: Bc-bocun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 4d71c767c4a54d1ec9fbd59b1a552f37b165288c)
target/linux/generic/pending-6.12/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
target/linux/generic/pending-6.12/738-01-net-ethernet-mtk_eth_soc-reduce-rx-ring-size-for-older.patch
target/linux/mediatek/patches-6.12/750-net-ethernet-mtk_eth_soc-add-mt7987-support.patch