linux/drivers/isdn
Abdun Nihaal 6dce43433e 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-11-24 10:36:08 +01:00
..
capi [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
hardware isdn: mISDN: hfcsusb: fix memory leak in hfcsusb_probe() 2025-11-24 10:36:08 +01:00
mISDN mISDN: Fix memory leak in dsp_hwec_enable() 2025-09-09 18:58:08 +02:00
Kconfig mISDN: add HAS_IOPORT dependencies 2023-05-31 19:17:40 +01:00
Makefile isdn: capi: dead code removal 2019-12-11 09:12:38 +01:00