forked from pool/multipath-tools
28 lines
822 B
Plaintext
28 lines
822 B
Plaintext
commit 1b043535b5584cf8298bf535e5794289f1b98f43
|
|
Author: Hannes Reinecke <hare@suse.de>
|
|
Date: Tue Nov 4 09:40:26 2008 +0100
|
|
|
|
Check for empty mpvecs in mpvec_garbage_collector()
|
|
|
|
During shutdown the mpvec pointer can indeed be empty, so we should
|
|
check it first before trying to access it.
|
|
|
|
References: 437245
|
|
|
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
|
|
diff --git a/multipathd/main.c b/multipathd/main.c
|
|
index 78e6ed3..a4b0311 100644
|
|
--- a/multipathd/main.c
|
|
+++ b/multipathd/main.c
|
|
@@ -798,6 +798,9 @@ mpvec_garbage_collector (struct vectors * vecs)
|
|
struct multipath * mpp;
|
|
unsigned int i;
|
|
|
|
+ if (!vecs->mpvec)
|
|
+ return;
|
|
+
|
|
vector_foreach_slot (vecs->mpvec, mpp, i) {
|
|
if (mpp && mpp->alias && !dm_map_present(mpp->alias)) {
|
|
condlog(2, "%s: remove dead map", mpp->alias);
|