Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1
multipath-tools
multipath-tools-crash-in-update-multipath
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File multipath-tools-crash-in-update-multipath of Package multipath-tools
diff --git a/libmultipath/configure.c b/libmultipath/configure.c index eb7ac03..3903b28 100644 --- a/libmultipath/configure.c +++ b/libmultipath/configure.c @@ -114,6 +114,9 @@ pgcmp (struct multipath * mpp, struct multipath * cmpp) struct pathgroup * cpgp; int r = 0; + if (!mpp) + return 0; + vector_foreach_slot (mpp->pg, pgp, i) { compute_pgid(pgp); diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c index e3cace9..3770566 100644 --- a/libmultipath/structs_vec.c +++ b/libmultipath/structs_vec.c @@ -163,6 +163,9 @@ _remove_maps (struct vectors * vecs, int stop_waiter) int i; struct multipath * mpp; + if (!vecs) + return; + vector_foreach_slot (vecs->mpvec, mpp, i) { _remove_map(mpp, vecs, stop_waiter, 1); i--; @@ -451,6 +454,9 @@ verify_paths(struct multipath * mpp, struct vectors * vecs, vector rpvec) int count = 0; int i, j; + if (!mpp) + return 0; + vector_foreach_slot (mpp->paths, pp, i) { /* * see if path is in sysfs diff --git a/libmultipath/vector.h b/libmultipath/vector.h index 993ba79..aa9e134 100644 --- a/libmultipath/vector.h +++ b/libmultipath/vector.h @@ -36,9 +36,9 @@ typedef struct _vector *vector; #define VECTOR_LAST_SLOT(V) ((V)->slot[((V)->allocated - 1)]) #define vector_foreach_slot(v,p,i) \ - for (i = 0; i < (v)->allocated && ((p) = (v)->slot[i]); i++) + for (i = 0; (v) && i < (v)->allocated && ((p) = (v)->slot[i]); i++) #define vector_foreach_slot_after(v,p,i) \ - for (; i < (v)->allocated && ((p) = (v)->slot[i]); i++) + for (; (v) && i < (v)->allocated && ((p) = (v)->slot[i]); i++) /* Prototypes */ extern vector vector_alloc(void);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor