Commit 6dce434
isdn: mISDN: hfcsusb: fix memory leak in hfcsusb_probe()
commit 3f978e3 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: 69f52ad ("mISDN: Add HFC USB driver")
Signed-off-by: Abdun Nihaal <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 90253ac commit 6dce434
1 file changed
+13
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1904 | 1904 | | |
1905 | 1905 | | |
1906 | 1906 | | |
1907 | | - | |
1908 | 1907 | | |
1909 | 1908 | | |
1910 | 1909 | | |
1911 | 1910 | | |
1912 | 1911 | | |
1913 | 1912 | | |
| 1913 | + | |
1914 | 1914 | | |
1915 | 1915 | | |
1916 | 1916 | | |
| |||
2101 | 2101 | | |
2102 | 2102 | | |
2103 | 2103 | | |
2104 | | - | |
2105 | | - | |
| 2104 | + | |
| 2105 | + | |
2106 | 2106 | | |
2107 | 2107 | | |
2108 | 2108 | | |
2109 | 2109 | | |
2110 | 2110 | | |
2111 | 2111 | | |
2112 | | - | |
2113 | | - | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
2114 | 2116 | | |
2115 | 2117 | | |
2116 | 2118 | | |
2117 | 2119 | | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
2118 | 2126 | | |
2119 | 2127 | | |
2120 | 2128 | | |
| |||
0 commit comments