mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
md/raid1: fix memory leak in raid1_run() if no active rdev
[ Upstream commit5fbcf76e0d] When `raid1_set_limits()` fails or when the array has no active `rdev`, the allocated memory for `conf` is not properly freed. Add raid1_free() call to properly free the conf in error path. Fixes:799af947ed("md/raid1: don't free conf on raid0_run failure") Signed-off-by: Zheng Qixing <zhengqixing@huawei.com> Link: https://lore.kernel.org/linux-raid/20250215020137.3703757-1-zhengqixing@huaweicloud.com Singed-off-by: Yu Kuai <yukuai3@huawei.com> Stable-dep-of:6abc7d5dcf("md/raid1: fix memory leak in raid1_run()") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
db8c4b15de
commit
aaac92c72d
1 changed files with 7 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue