summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/geom/virstor/g_virstor.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/geom/virstor/g_virstor.c b/sys/geom/virstor/g_virstor.c
index a180ef2..40e25d1 100644
--- a/sys/geom/virstor/g_virstor.c
+++ b/sys/geom/virstor/g_virstor.c
@@ -235,6 +235,12 @@ virstor_ctl_stop(struct gctl_req *req, struct g_class *cp)
return;
}
sc = virstor_find_geom(cp, name);
+ if (sc == NULL) {
+ gctl_error(req, "Don't know anything about '%s'", name);
+ g_topology_unlock();
+ return;
+ }
+
LOG_MSG(LVL_INFO, "Stopping %s by the userland command",
sc->geom->name);
update_metadata(sc);
OpenPOWER on IntegriCloud