diff --git a/sys/geom/concat/g_concat.c b/sys/geom/concat/g_concat.c index ad56f43490f8..021c9f56fc00 100644 --- a/sys/geom/concat/g_concat.c +++ b/sys/geom/concat/g_concat.c @@ -753,6 +753,10 @@ g_concat_ctl_create(struct gctl_req *req, struct g_class *mp) for (attached = 0, no = 1; no < *nargs; no++) { snprintf(param, sizeof(param), "arg%u", no); name = gctl_get_asciiparam(req, param); + if (name == NULL) { + gctl_error(req, "No 'arg%d' argument.", no); + return; + } if (strncmp(name, "/dev/", strlen("/dev/")) == 0) name += strlen("/dev/"); pp = g_provider_by_name(name);