svn commit: r200276 - stable/7/sys/geom/virstor
Xin LI
delphij at FreeBSD.org
Tue Dec 8 13:46:30 PST 2009
Author: delphij
Date: Tue Dec 8 21:46:30 2009
New Revision: 200276
URL: http://svn.freebsd.org/changeset/base/200276
Log:
MFC r180120:
Avoid NULL deference.
Modified:
stable/7/sys/geom/virstor/g_virstor.c
Directory Properties:
stable/7/sys/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
Modified: stable/7/sys/geom/virstor/g_virstor.c
==============================================================================
--- stable/7/sys/geom/virstor/g_virstor.c Tue Dec 8 21:42:04 2009 (r200275)
+++ stable/7/sys/geom/virstor/g_virstor.c Tue Dec 8 21:46:30 2009 (r200276)
@@ -225,6 +225,11 @@ virstor_ctl_stop(struct gctl_req *req, s
sprintf(param, "arg%d", i);
name = gctl_get_asciiparam(req, param);
+ if (name == NULL) {
+ gctl_error(req, "No 'arg%d' argument", i);
+ g_topology_unlock();
+ return;
+ }
sc = virstor_find_geom(cp, name);
LOG_MSG(LVL_INFO, "Stopping %s by the userland command",
sc->geom->name);
More information about the svn-src-stable
mailing list