Skip to content

Commit efbd50d

Browse files
khoroshilovmarckleinebudde
authored andcommitted
can: esd_usb2: fix memory leak on disconnect
It seems struct esd_usb2 dev is not deallocated on disconnect. The patch adds the missing deallocation. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
1 parent 98e6901 commit efbd50d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/net/can/usb/esd_usb2.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,7 @@ static void esd_usb2_disconnect(struct usb_interface *intf)
11431143
}
11441144
}
11451145
unlink_all_urbs(dev);
1146+
kfree(dev);
11461147
}
11471148
}
11481149

0 commit comments

Comments
 (0)