linux/drivers/isdn
Abdun Nihaal b70c24827e isdn: mISDN: hfcsusb: fix memory leak in hfcsusb_probe()
commit 3f978e3f15 upstream.

In hfcsusb_probe(), the memory allocated for ctrl_urb gets leaked when
setup_instance() fails with an error code. Fix that by freeing the urb
before freeing the hw structure. Also change the error paths to use the
goto ladder style.

Compile tested only. Issue found using a prototype static analysis tool.

Fixes: 69f52adb2d ("mISDN: Add HFC USB driver")
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Link: https://patch.msgid.link/20251030042524.194812-1-nihaal@cse.iitm.ac.in
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-12-07 06:09:30 +09:00
..
capi isdn: cpai: check ctr->cnr to avoid array index out of bound 2021-10-08 16:52:58 -07:00
hardware isdn: mISDN: hfcsusb: fix memory leak in hfcsusb_probe() 2025-12-07 06:09:30 +09:00
mISDN mISDN: Fix memory leak in dsp_hwec_enable() 2025-09-09 18:50:18 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile isdn: capi: dead code removal 2019-12-11 09:12:38 +01:00