[parted-devel] [PATCH 0/6] fix memleak and avoid to use NULL pointer

Wu Guanghao wuguanghao3 at huawei.com
Wed Dec 15 08:29:58 GMT 2021


We found some memory leaks and null pointer operations through tool scans

Wu Guanghao (6):
  hfsplus_btree_search: free node when hfsplus_file_read failed
  amiga_read: need free part and partition when constraint_exact is NULL
  scsi_get_product_info: fix memleak and avoid to use NULL pointer
  fat_op_context_new: free ctx->remap and goto correct label to avoid
    memleak
  hfsplus_cache_from_extent: fix memleak
  fat_clobber: set boot_sector = NULL and free boot_sector after failed
    of fat_boot_sector_read

 libparted/arch/linux.c          | 9 +++++----
 libparted/fs/r/fat/context.c    | 8 +++++---
 libparted/fs/r/fat/fat.c        | 6 ++++--
 libparted/fs/r/hfs/advfs_plus.c | 5 +++--
 libparted/fs/r/hfs/reloc_plus.c | 4 +++-
 libparted/labels/rdb.c          | 5 ++++-
 6 files changed, 24 insertions(+), 13 deletions(-)

-- 
2.27.0




More information about the parted-devel mailing list