Message ID | 20230406114011.3297545-5-miaoguanqin@huawei.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | Fix memory leak for Manage Assemble Kill mdadm | expand |
diff --git a/mdadm.c b/mdadm.c index 4685ad6b..19d7916b 100644 --- a/mdadm.c +++ b/mdadm.c @@ -1709,6 +1709,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);