diff mbox series

[14/16] multipathd: fix segfault in cli_list_map_fmt()

Message ID 20220901160952.2167-15-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series multipath-tools: minor fixes and build improvements | expand

Commit Message

Martin Wilck Sept. 1, 2022, 4:09 p.m. UTC
From: Martin Wilck <mwilck@suse.com>

get_multipath_layout() must be passed an mpvec, not a pathvec.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 multipathd/cli_handlers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
index db4d441..3d39967 100644
--- a/multipathd/cli_handlers.c
+++ b/multipathd/cli_handlers.c
@@ -420,7 +420,7 @@  cli_list_map_fmt (void *v, struct strbuf *reply, void *data)
 
 	if ((width = alloc_multipath_layout()) == NULL)
 		return 1;
-	get_multipath_layout(vecs->pathvec, 1, width);
+	get_multipath_layout(vecs->mpvec, 1, width);
 	param = convert_dev(param, 0);
 	mpp = find_mp_by_str(vecs->mpvec, param);
 	if (!mpp)