Skip to content

Commit da7283d

Browse files
DruidosZhengShunQian
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 72dc245 commit da7283d

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
@@ -1078,6 +1078,7 @@ static void ems_usb_disconnect(struct usb_interface *intf)
10781078
usb_free_urb(dev->intr_urb);
10791079

10801080
kfree(dev->intr_in_buffer);
1081+
kfree(dev->tx_msg_buffer);
10811082
}
10821083
}
10831084

0 commit comments

Comments
 (0)