]> git.baikalelectronics.ru Git - kernel.git/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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Jul 2020 19:22:24 +0000 (12:22 -0700)
commit86f192ac14c6de9aa94f32e291aca8a6c74c022c
treeb173462751b8ddd618c34c8ca6c6f17127fe6d01
parent3b64186616158ec2a34a0b1d8bec43b8528c0fc9
smsc95xx: avoid memory leak in smsc95xx_bind

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: 59b6c9c01bfb6 ("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>
drivers/net/usb/smsc95xx.c