From 0a3384a8f8c981293f7ec72521b95f910e6220f5 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Wed, 11 May 2005 18:07:39 +0000 Subject: [PATCH] Check return value. Found by: Coverity Prevent analysis tool --- sys/geom/stripe/g_stripe.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/geom/stripe/g_stripe.c b/sys/geom/stripe/g_stripe.c index e9dfeba4b072..6fb8609e0cc1 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);