Date: Tue, 8 Dec 2009 21:46:30 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r200276 - stable/7/sys/geom/virstor Message-ID: <200912082146.nB8LkU4C000998@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912082146.nB8LkU4C000998>