Commit 5fd4396
most: core: fix leak on early registration failure
[ Upstream commit 2c198c2 ]
A recent commit fixed a resource leak on early registration failures but
for some reason left out the first error path which still leaks the
resources associated with the interface.
Fix up also the first error path so that the interface is always
released on errors.
Fixes: 1f4c9d8 ("most: core: fix resource leak in most_register_interface error paths")
Fixes: 723de0f ("staging: most: remove device from interface structure")
Cc: Christian Gromm <[email protected]>
Cc: Navaneeth K <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>1 parent 4510afe commit 5fd4396
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1282 | 1282 | | |
1283 | 1283 | | |
1284 | 1284 | | |
1285 | | - | |
1286 | | - | |
| 1285 | + | |
1287 | 1286 | | |
1288 | 1287 | | |
1289 | 1288 | | |
1290 | 1289 | | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
1291 | 1296 | | |
1292 | 1297 | | |
1293 | 1298 | | |
| |||
0 commit comments