free_multipathvec() is always called with KEEP_PATHS=free_paths. Remove the argument.
Signed-off-by: Martin Wilck <[email protected]> --- libmpathpersist/mpath_persist.c | 2 +- libmultipath/structs.c | 4 ++-- libmultipath/structs.h | 2 +- multipath/main.c | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c index f5267eb..e786e91 100644 --- a/libmpathpersist/mpath_persist.c +++ b/libmpathpersist/mpath_persist.c @@ -76,7 +76,7 @@ static vector pathvec; static void mpath_persistent_reserve_free_vecs__(vector curmp, vector pathvec) { - free_multipathvec(curmp, KEEP_PATHS); + free_multipathvec(curmp); free_pathvec(pathvec, FREE_PATHS); } diff --git a/libmultipath/structs.c b/libmultipath/structs.c index 7b5b483..1ee29f6 100644 --- a/libmultipath/structs.c +++ b/libmultipath/structs.c @@ -348,7 +348,7 @@ void cleanup_multipath_and_paths(struct multipath **pmpp) } void -free_multipathvec (vector mpvec, enum free_path_mode free_paths) +free_multipathvec (vector mpvec) { int i; struct multipath * mpp; @@ -357,7 +357,7 @@ free_multipathvec (vector mpvec, enum free_path_mode free_paths) return; vector_foreach_slot (mpvec, mpp, i) - free_multipath(mpp, free_paths); + free_multipath(mpp, KEEP_PATHS); vector_free(mpvec); } diff --git a/libmultipath/structs.h b/libmultipath/structs.h index 3a52c01..738bea6 100644 --- a/libmultipath/structs.h +++ b/libmultipath/structs.h @@ -583,7 +583,7 @@ void free_multipath (struct multipath *, enum free_path_mode free_paths); void cleanup_multipath(struct multipath **pmpp); void cleanup_multipath_and_paths(struct multipath **pmpp); void free_multipath_attributes (struct multipath *); -void free_multipathvec (vector mpvec, enum free_path_mode free_paths); +void free_multipathvec(vector mpvec); struct adapter_group * alloc_adaptergroup(void); struct host_group * alloc_hostgroup(void); diff --git a/multipath/main.c b/multipath/main.c index 58db288..4b8d7dd 100644 --- a/multipath/main.c +++ b/multipath/main.c @@ -436,7 +436,7 @@ static bool released_to_systemd(void) static struct vectors vecs; static void cleanup_vecs(void) { - free_multipathvec(vecs.mpvec, KEEP_PATHS); + free_multipathvec(vecs.mpvec); free_pathvec(vecs.pathvec, FREE_PATHS); } @@ -580,9 +580,9 @@ out: if (refwwid) free(refwwid); - free_multipathvec(curmp, KEEP_PATHS); + free_multipathvec(curmp); vecs.mpvec = NULL; - free_multipathvec(newmp, KEEP_PATHS); + free_multipathvec(newmp); free_pathvec(pathvec, FREE_PATHS); vecs.pathvec = NULL; -- 2.52.0
