Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a64e47ee authored by Anton Vasilyev's avatar Anton Vasilyev Committed by Greg Kroah-Hartman
Browse files

can: ems_usb: Fix memory leak on ems_usb_disconnect()



commit 72c05f32f4a5055c9c8fe889bb6903ec959c0aad 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: default avatarAnton Vasilyev <vasilyev@ispras.ru>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4a60e543
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1083,6 +1083,7 @@ static void ems_usb_disconnect(struct usb_interface *intf)
		usb_free_urb(dev->intr_urb);

		kfree(dev->intr_in_buffer);
		kfree(dev->tx_msg_buffer);
	}
}