Skip to content

Commit c8159f9

Browse files
Druidosgregkh
authored andcommitted
can: ems_usb: Fix memory leak on ems_usb_disconnect()
commit 72c05f3 upstream. ems_usb_probe() allocates memory for dev->tx_msg_buffer, but there is no its deallocation in ems_usb_disconnect(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <[email protected]> Cc: <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e7de671 commit c8159f9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/can/usb/ems_usb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,7 @@ static void ems_usb_disconnect(struct usb_interface *intf)
10711071
usb_free_urb(dev->intr_urb);
10721072

10731073
kfree(dev->intr_in_buffer);
1074+
kfree(dev->tx_msg_buffer);
10741075
}
10751076
}
10761077

0 commit comments

Comments
 (0)