diff mbox series

[v2,1/2] multipathd: fix null pointer dereference in uev_update_path

Message ID 20240117011912.18710-2-bmarzins@redhat.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series Fix auto resize code | expand

Commit Message

Benjamin Marzinski Jan. 17, 2024, 1:19 a.m. UTC
The Auto-resize code added a check that deferences pp->mpp without
checking that it's non-NULL. Fix it.

Fixes: 981b83ad1 ("multipathd: Add auto_resize config option")
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 multipathd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/multipathd/main.c b/multipathd/main.c
index 74f6cd92..fbc3f8da 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1630,7 +1630,7 @@  uev_update_path (struct uevent *uev, struct vectors * vecs)
 				}
 			}
 		}
-		if (auto_resize != AUTO_RESIZE_NEVER &&
+		if (auto_resize != AUTO_RESIZE_NEVER && mpp &&
 		    !mpp->wait_for_udev) {
 			struct pathgroup *pgp;
 			struct path *pp2;