can: ems_usb: Fix memory leak on ems_usb_disconnect()

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 <vasilyev@ispras.ru>
Cc: <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
Anton Vasilyev 2018-07-27 18:50:42 +03:00 committed by Marc Kleine-Budde
parent 25432eba9c
commit 72c05f32f4
1 changed files with 1 additions and 0 deletions

View File

@ -1072,6 +1072,7 @@ static void ems_usb_disconnect(struct usb_interface *intf)
usb_free_urb(dev->intr_urb); usb_free_urb(dev->intr_urb);
kfree(dev->intr_in_buffer); kfree(dev->intr_in_buffer);
kfree(dev->tx_msg_buffer);
} }
} }