Commit c9ac2ac
md/raid10: fix memleak for 'conf->bio_split'
In the error path of raid10_run(), 'conf' need be freed, however,
'conf->bio_split' is missed and memory will be leaked.
Since there are 3 places to free 'conf', factor out a helper to fix the
problem.
Fixes: fc9977d ("md/raid10: simplify the splitting of requests.")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230310073855.1337560-6-yukuai1@huaweicloud.com1 parent 26208a7 commit c9ac2ac
1 file changed
Lines changed: 17 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4017 | 4017 | | |
4018 | 4018 | | |
4019 | 4019 | | |
| 4020 | + | |
| 4021 | + | |
| 4022 | + | |
| 4023 | + | |
| 4024 | + | |
| 4025 | + | |
| 4026 | + | |
| 4027 | + | |
| 4028 | + | |
| 4029 | + | |
| 4030 | + | |
| 4031 | + | |
| 4032 | + | |
| 4033 | + | |
4020 | 4034 | | |
4021 | 4035 | | |
4022 | 4036 | | |
| |||
4099 | 4113 | | |
4100 | 4114 | | |
4101 | 4115 | | |
4102 | | - | |
4103 | | - | |
4104 | | - | |
4105 | | - | |
4106 | | - | |
4107 | | - | |
4108 | | - | |
| 4116 | + | |
4109 | 4117 | | |
4110 | 4118 | | |
4111 | 4119 | | |
| |||
4296 | 4304 | | |
4297 | 4305 | | |
4298 | 4306 | | |
4299 | | - | |
4300 | | - | |
4301 | | - | |
4302 | | - | |
| 4307 | + | |
4303 | 4308 | | |
4304 | 4309 | | |
4305 | 4310 | | |
4306 | 4311 | | |
4307 | 4312 | | |
4308 | 4313 | | |
4309 | 4314 | | |
4310 | | - | |
4311 | | - | |
4312 | | - | |
4313 | | - | |
4314 | | - | |
4315 | | - | |
4316 | | - | |
4317 | | - | |
4318 | | - | |
| 4315 | + | |
4319 | 4316 | | |
4320 | 4317 | | |
4321 | 4318 | | |
| |||
0 commit comments