Commit f0ddb83
md/raid10: fix memleak of md thread
In raid10_run(), if setup_conf() succeed and raid10_run() failed before
setting 'mddev->thread', then in the error path 'conf->thread' is not
freed.
Fix the problem by setting 'mddev->thread' right after setup_conf().
Fixes: 43a5212 ("md-cluster: choose correct label when clustered layout is not supported")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230310073855.1337560-7-yukuai1@huaweicloud.com1 parent c9ac2ac commit f0ddb83
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4150 | 4150 | | |
4151 | 4151 | | |
4152 | 4152 | | |
| 4153 | + | |
| 4154 | + | |
| 4155 | + | |
4153 | 4156 | | |
4154 | 4157 | | |
4155 | 4158 | | |
| |||
4162 | 4165 | | |
4163 | 4166 | | |
4164 | 4167 | | |
4165 | | - | |
4166 | | - | |
4167 | | - | |
4168 | 4168 | | |
4169 | 4169 | | |
4170 | 4170 | | |
| |||
0 commit comments