All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] solve memory leak and check whether NULL pointer
@ 2021-12-31  7:40 zhanchengbin
  2021-12-31  7:41 ` [PATCH v2 1/6] e2fsck: set s->len=0 if malloc() fails in, alloc_string() zhanchengbin
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zhanchengbin @ 2021-12-31  7:40 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: linux-ext4, liuzhiqiang26, linfeilong, wubo40

Solve the memory leak of the abnormal branch and the new null pointer check

Changes from V1:
---------------
- In the V1 of the patch series, have a bug in patch 1/6, when s->s get
   memory successd, s-len is not assigned a value.

zhanchengbin (6):
   e2fsck: set s->len=0 if malloc() fails in alloc_string()
   lib/ss: check whether argp is null before accessing it in
     ss_execute_command()
   lib/support: check whether inump is null before accessing it in
     quota_set_sb_inum()
   e2fsprogs: call ext2fs_badblocks_list_free() to free list in exception
     branch
   e2fsck: check whether ldesc is null before accessing it in
     end_problem_latch()
   lib/ext2fs: call ext2fs_free_mem() to free &io->name in exception
     branch

  e2fsck/logfile.c      | 2 +-
  e2fsck/problem.c      | 2 ++
  lib/ext2fs/test_io.c  | 2 ++
  lib/ext2fs/undo_io.c  | 2 ++
  lib/ss/execute_cmd.c  | 2 ++
  lib/support/mkquota.c | 3 ++-
  misc/dumpe2fs.c       | 1 +
  resize/resize2fs.c    | 4 ++--
  8 files changed, 14 insertions(+), 4 deletions(-)

-- 
2.27.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-12 17:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-31  7:40 [PATCH v2 0/6] solve memory leak and check whether NULL pointer zhanchengbin
2021-12-31  7:41 ` [PATCH v2 1/6] e2fsck: set s->len=0 if malloc() fails in, alloc_string() zhanchengbin
2021-12-31  7:42 ` [PATCH v2 2/6] lib/ss: check whether argp is null before accessing it, in ss_execute_command() zhanchengbin
2021-12-31  7:42 ` [PATCH v2 3/6] lib/support: check whether inump is null before, accessing it in quota_set_sb_inum() zhanchengbin
2021-12-31  7:42 ` [PATCH v2 4/6] e2fsprogs: call ext2fs_badblocks_list_free() to free, list in exception branch zhanchengbin
2021-12-31  7:43 ` [PATCH v2 5/6] e2fsck: check whether ldesc is null before accessing, it in end_problem_latch() zhanchengbin
2021-12-31  7:43 ` [PATCH v2 6/6] lib/ext2fs: call ext2fs_free_mem() to free &io->name, in exception branch zhanchengbin
2022-05-12 17:14 ` [PATCH v2 0/6] solve memory leak and check whether NULL pointer Theodore Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.