Through tool scanning and code review, we found several memory leaks and double free. v2: - add empty lines to separate declarations and not related code sections. [1/5] - free super->buf and set NULL in load_imsm_mpb [3/5] - optimize code to avoid code duplication. [4/5] Wu Guanghao (5): parse_layout_faulty: fix memleak Detail: fix memleak load_imsm_mpb: fix double free find_disk_attached_hba: fix memleak get_vd_num_of_subarray: fix memleak Detail.c | 1 + super-ddf.c | 9 +++++++-- super-intel.c | 5 +++-- util.c | 3 +++ 4 files changed, 14 insertions(+), 4 deletions(-) -- 2.27.0