Projects
Eulaceura:Factory
mdadm
_service:obs_scm:0018-fix-memory-leak-in-file-m...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:0018-fix-memory-leak-in-file-mdadm.patch of Package mdadm
From e62a561ee8b7157a2390eab215dcef6240bd7b03 Mon Sep 17 00:00:00 2001 From: Guanqin Miao <miaoguanqin@huawei.com> Date: Mon, 24 Apr 2023 16:06:37 +0800 Subject: Fix memory leak in file mdadm When we test mdadm with asan, we found some memory leaks in mdadm.c We fix these memory leaks based on code logic. 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> --- mdadm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mdadm.c b/mdadm.c index 26299b2..f0016f6 100644 --- a/mdadm.c +++ b/mdadm.c @@ -1775,6 +1775,10 @@ int main(int argc, char *argv[]) autodetect(); break; } + if (ss) { + ss->ss->free_super(ss); + free(ss); + } if (locked) cluster_release_dlmlock(); close_fd(&mdfd); -- 2.27.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2