]> 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)
commit0e2a62adb378a3897b4d44198553cdb8f4132330
treeb173462751b8ddd618c34c8ca6c6f17127fe6d01
parentd0b2b75413d021b5bb2c4c9ba57e9c2a6f68b9d9
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: 9b1b7ad8f9934 ("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