summaryrefslogtreecommitdiffstats
path: root/sys/geom/raid3/g_raid3_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/raid3/g_raid3_ctl.c')
-rw-r--r--sys/geom/raid3/g_raid3_ctl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/geom/raid3/g_raid3_ctl.c b/sys/geom/raid3/g_raid3_ctl.c
index 8e36fdd..4ac04e0 100644
--- a/sys/geom/raid3/g_raid3_ctl.c
+++ b/sys/geom/raid3/g_raid3_ctl.c
@@ -101,11 +101,19 @@ g_raid3_ctl_configure(struct gctl_req *req, struct g_class *mp)
g_topology_assert();
nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs));
+ if (nargs == NULL) {
+ gctl_error(req, "No '%s' argument.", "nargs");
+ return;
+ }
if (*nargs != 1) {
gctl_error(req, "Invalid number of arguments.");
return;
}
name = gctl_get_asciiparam(req, "arg0");
+ if (name == NULL) {
+ gctl_error(req, "No 'arg%u' argument.", 0);
+ return;
+ }
sc = g_raid3_find_device(mp, name);
if (sc == NULL) {
gctl_error(req, "No such device: %s.", name);
OpenPOWER on IntegriCloud