Commit 2a2f520
block: fix zones_cond memory leak on zone revalidation error paths
When blk_revalidate_disk_zones() fails after disk_revalidate_zone_resources()
has allocated args.zones_cond, the memory is leaked because no error path
frees it.
Fixes: 6e945ff ("block: use zone condition to determine conventional zones")
Suggested-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Link: https://patch.msgid.link/20260331111216.24242-1-liu.yun@linux.dev
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 267ec4d commit 2a2f520
1 file changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2016 | 2016 | | |
2017 | 2017 | | |
2018 | 2018 | | |
| 2019 | + | |
2019 | 2020 | | |
2020 | 2021 | | |
2021 | 2022 | | |
| |||
2038 | 2039 | | |
2039 | 2040 | | |
2040 | 2041 | | |
2041 | | - | |
2042 | | - | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
2043 | 2047 | | |
2044 | | - | |
| 2048 | + | |
2045 | 2049 | | |
2046 | 2050 | | |
2047 | 2051 | | |
| |||
2073 | 2077 | | |
2074 | 2078 | | |
2075 | 2079 | | |
| 2080 | + | |
2076 | 2081 | | |
2077 | 2082 | | |
2078 | 2083 | | |
| |||
2353 | 2358 | | |
2354 | 2359 | | |
2355 | 2360 | | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
2356 | 2364 | | |
2357 | 2365 | | |
2358 | 2366 | | |
2359 | 2367 | | |
2360 | | - | |
| 2368 | + | |
2361 | 2369 | | |
2362 | 2370 | | |
2363 | 2371 | | |
| 2372 | + | |
2364 | 2373 | | |
2365 | 2374 | | |
2366 | | - | |
2367 | | - | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
2368 | 2380 | | |
| 2381 | + | |
2369 | 2382 | | |
2370 | 2383 | | |
| 2384 | + | |
2371 | 2385 | | |
2372 | 2386 | | |
2373 | 2387 | | |
| |||
0 commit comments