diff options
author | pjd <pjd@FreeBSD.org> | 2005-05-11 18:07:39 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2005-05-11 18:07:39 +0000 |
commit | 9d22b74b8fcfeef2e138d5b54c13cacb6de13d20 (patch) | |
tree | 0913243f6cf42922287a4de7be1e3e2dd1e565f5 | |
parent | 11168a608905bdf6f432291f615ae206df257bf4 (diff) | |
download | FreeBSD-src-9d22b74b8fcfeef2e138d5b54c13cacb6de13d20.zip FreeBSD-src-9d22b74b8fcfeef2e138d5b54c13cacb6de13d20.tar.gz |
Check return value.
Found by: Coverity Prevent analysis tool
-rw-r--r-- | sys/geom/stripe/g_stripe.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/geom/stripe/g_stripe.c b/sys/geom/stripe/g_stripe.c index e9dfeba..6fb8609 100644 --- a/sys/geom/stripe/g_stripe.c +++ b/sys/geom/stripe/g_stripe.c @@ -1037,6 +1037,10 @@ g_stripe_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%u' argument.", no); + continue; + } if (strncmp(name, "/dev/", strlen("/dev/")) == 0) name += strlen("/dev/"); pp = g_provider_by_name(name); |