Avoid NULL deference.

Reviewed by:	ivoras
This commit is contained in:
Xin LI 2008-06-30 15:21:42 +00:00
parent 345f9e9dc7
commit 6c97c325ff
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=180120

View File

@ -225,6 +225,11 @@ virstor_ctl_stop(struct gctl_req *req, struct g_class *cp)
sprintf(param, "arg%d", i);
name = gctl_get_asciiparam(req, param);
if (name == NULL) {
gctl_error(req, "No 'arg%d' argument", i);
g_topology_unlock();
return;
}
sc = virstor_find_geom(cp, name);
LOG_MSG(LVL_INFO, "Stopping %s by the userland command",
sc->geom->name);