]> git.itanic.dy.fi Git - linux-stable/commit
smsc95xx: avoid memory leak in smsc95xx_bind
authorAndre Edich <andre.edich@microchip.com>
Mon, 6 Jul 2020 08:39:35 +0000 (10:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 07:10:45 +0000 (09:10 +0200)
commit1f8135846a7cb32d9df7e1cadca9659b09da5783
tree1f2737486438fea41f4d91b62a153173d746d107
parentdc524e408670fb21f12e420c4b6ff35871ab2805
smsc95xx: avoid memory leak in smsc95xx_bind

[ Upstream commit 3ed58f96a70b85ef646d5427258f677f1395b62f ]

In a case where the ID_REV register read is failed, the memory for a
private data structure has to be freed before returning error from the
function smsc95xx_bind.

Fixes: bbd9f9ee69242 ("smsc95xx: add wol support for more frame types")
Signed-off-by: Andre Edich <andre.edich@microchip.com>
Signed-off-by: Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/smsc95xx.c