]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Fix memory leak in file Assemble
authorGuanqin Miao <miaoguanqin@huawei.com>
Mon, 24 Apr 2023 08:06:34 +0000 (16:06 +0800)
committerJes Sorensen <jes@trained-monkey.org>
Fri, 1 Sep 2023 16:06:53 +0000 (12:06 -0400)
commite9fb93af0f769d147a13e86ab4e5d0aeb935e9fc
tree999e6855dd32f38b3df747bd0a8f65b8c35ae674
parent1ab341e5ce0cb01a1533a2c36e5b69eabf12bf95
Fix memory leak in file Assemble

When we test mdadm with asan, we found some memory leaks in Assemble.c
We fix these memory leaks based on code logic.

v2: Set st = NULL before jumping to loop

Signed-off-by: Guanqin Miao <miaoguanqin@huawei.com>
Signed-off-by: Li Xiao Keng <lixiaokeng@huawei.com>
Acked-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
Assemble.c