blob: f278607c8680e8890b5071c62c84d7f1dd54b072 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
index 7b1cb62..4b860bb 100644
--- a/multipathd/cli_handlers.c
+++ b/multipathd/cli_handlers.c
@@ -603,7 +603,18 @@ cli_resize(void *v, char **reply, int *len, void *data)
}
pgp = VECTOR_SLOT(mpp->pg, 0);
+
+ if (!pgp){
+ condlog(0, "%s: couldn't get path group. cannot resize",
+ mapname);
+ return 1;
+ }
pp = VECTOR_SLOT(pgp->paths, 0);
+
+ if (!pp){
+ condlog(0, "%s: couldn't get path. cannot resize", mapname);
+ return 1;
+ }
if (!pp->udev || sysfs_get_size(pp, &size)) {
condlog(0, "%s: couldn't get size for sysfs. cannot resize",
mapname);
|