]> www.infradead.org Git - users/dwmw2/linux.git/commit
staging: mt7621-eth: Fix memory leak in mtk_add_mac() error path
authorKamal Heib <kamalheib1@gmail.com>
Tue, 19 Jun 2018 17:04:08 +0000 (20:04 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Oct 2018 23:59:11 +0000 (16:59 -0700)
commit5208cebb4ca394b9809d37035c6e3c66c3ef2f9c
treed6f660ec27b0ce151e469dbe9bfd985986b9e401
parent6cbaed5c50ac046fdad63fef1463201750407e44
staging: mt7621-eth: Fix memory leak in mtk_add_mac() error path

[ Upstream commit 85e1d42663a0c163002961d2685be952067b0dc2 ]

Fix memory leak in error path of mtk_add_mac() by make sure to free
the allocated netdev.

Fixes: e3cbf478f846 ('staging: mt7621-eth: add the drivers core files')
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-eth/mtk_eth_soc.c