lkml.org 
[lkml]   [2022]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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]
\
 
 \ /
  Last update: 2022-11-24 15:46    [W:0.030 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site