[dm-devel] [PATCH v2 0/6] Memory issues found by coverity

Benjamin Marzinski bmarzins at redhat.com
Thu May 13 17:23:09 UTC 2021


This is collection of issues found by coverity. The first three patches
deal with ev_remove_path() removing the path, but returning failure,
causing a use-after-free error. The next two patches fix memory leaks.
The final patch cleans up the returns from ev_remove_path().

Changes from v1:
0001: changed comment based on Martin's suggestion
0004: moved location of atexit() call based on Martin's suggestion
0006: New patch, based on Martin's comments on patch 0003

Benjamin Marzinski (6):
  multipathd: don't fail to remove path once the map is removed
  multipathd: remove duplicate orphan_paths in flush_map
  multipathd: make ev_remove_path return success on path removal
  multipath: free vectors in configure
  kpartx: Don't leak memory when getblock returns NULL
  multipathd: use symbolic returns for ev_remove_path()

 kpartx/kpartx.c            |  2 ++
 libmultipath/structs_vec.c |  4 +--
 multipath/main.c           |  7 +++++-
 multipathd/cli_handlers.c  | 14 +++++++++--
 multipathd/main.c          | 51 ++++++++++++++++++++++----------------
 multipathd/main.h          |  9 +++++++
 6 files changed, 60 insertions(+), 27 deletions(-)

-- 
2.17.2




More information about the dm-devel mailing list