Messages in this thread | | | Date | Thu, 24 Nov 2022 15:45:32 +0100 | From | Marc Kleine-Budde <> | Subject | Re: [PATCH] can: mcba_usb: fix potential resource leak in mcba_usb_xmit_cmd() |
| |
On 20.11.2022 18:14:14, Jianglei Nie wrote: > mcba_usb_xmit_cmd() gets free ctx by mcba_usb_get_free_ctx(). When > mcba_usb_xmit() fails, the ctx should be freed with mcba_usb_free_ctx() > like mcba_usb_start_xmit() does in label "xmit_failed" to avoid potential > resource leak. > > Fix it by calling mcba_usb_free_ctx() when mcba_usb_xmit() fails. > > Signed-off-by: Jianglei Nie <niejianglei2021@163.com>
Applied to linux-can.
Thanks, Marc
-- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | [unhandled content-type:application/pgp-signature] | |