Blame SOURCES/0052-RH-fix-bad-derefs.patch

671555
---
671555
 multipathd/cli_handlers.c |    3 ++-
671555
 multipathd/main.c         |   12 ++++++------
671555
 2 files changed, 8 insertions(+), 7 deletions(-)
671555
671555
Index: multipath-tools-130222/multipathd/cli_handlers.c
671555
===================================================================
671555
--- multipath-tools-130222.orig/multipathd/cli_handlers.c
671555
+++ multipath-tools-130222/multipathd/cli_handlers.c
671555
@@ -632,7 +632,8 @@ cli_resize(void *v, char **reply, int *l
671555
 		return 1;
671555
 
671555
 	dm_lib_release();
671555
-	setup_multipath(vecs, mpp);
671555
+	if (setup_multipath(vecs, mpp) != 0)
671555
+		return 1;
671555
 	sync_map_state(mpp);
671555
 
671555
 	return 0;
671555
Index: multipath-tools-130222/multipathd/main.c
671555
===================================================================
671555
--- multipath-tools-130222.orig/multipathd/main.c
671555
+++ multipath-tools-130222/multipathd/main.c
671555
@@ -134,7 +134,6 @@ coalesce_maps(struct vectors *vecs, vect
671555
 	struct multipath * ompp;
671555
 	vector ompv = vecs->mpvec;
671555
 	unsigned int i;
671555
-	int j;
671555
 
671555
 	vector_foreach_slot (ompv, ompp, i) {
671555
 		if (!find_mp_by_wwid(nmpv, ompp->wwid)) {
671555
@@ -148,16 +147,17 @@ coalesce_maps(struct vectors *vecs, vect
671555
 				/*
671555
 				 * may be just because the device is open
671555
 				 */
671555
+				if (setup_multipath(vecs, ompp) != 0) {
671555
+					i--;
671555
+					continue;
671555
+				}
671555
 				if (!vector_alloc_slot(nmpv))
671555
 					return 1;
671555
 
671555
 				vector_set_slot(nmpv, ompp);
671555
-				setup_multipath(vecs, ompp);
671555
 
671555
-				if ((j = find_slot(ompv, (void *)ompp)) != -1)
671555
-					vector_del_slot(ompv, j);
671555
-
671555
-				continue;
671555
+				vector_del_slot(ompv, i);
671555
+				i--;
671555
 			}
671555
 			else {
671555
 				dm_lib_release();