projects
/
multipath-tools
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
5ee9f71
)
multipathd/cli_handlers cli_resize : check pp and pgp before calling them to avoid...
author
Eli Qiao
<taget@linux.vnet.ibm.com>
Mon, 17 Jun 2013 03:53:22 +0000
(11:53 +0800)
committer
Christophe Varoqui
<christophe.varoqui@opensvc.com>
Mon, 17 Jun 2013 05:41:53 +0000
(07:41 +0200)
Signed-off-by: Eli Qiao <taget@linux.vnet.ibm.com>
multipathd/cli_handlers.c
patch
|
blob
|
history
diff --git
a/multipathd/cli_handlers.c
b/multipathd/cli_handlers.c
index
7b1cb62
..
4b860bb
100644
(file)
--- 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);