OSDN Git Service

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>
Thu, 28 Jun 2018 12:50:16 +0000 (21:50 +0900)
commit85e1d42663a0c163002961d2685be952067b0dc2
tree8ae6aba82ec794a3ebe3e694970992bfcb8d3c8c
parentd0233204fbc10f003d1ef077f57341c2feca4002
staging: mt7621-eth: Fix memory leak in mtk_add_mac() error path

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>
drivers/staging/mt7621-eth/mtk_eth_soc.c