From owner-svn-src-stable@FreeBSD.ORG Tue Dec 8 21:46:30 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 566CF106568B; Tue, 8 Dec 2009 21:46:30 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 447F88FC21; Tue, 8 Dec 2009 21:46:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB8LkU7j001000; Tue, 8 Dec 2009 21:46:30 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB8LkU4C000998; Tue, 8 Dec 2009 21:46:30 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200912082146.nB8LkU4C000998@svn.freebsd.org> From: Xin LI Date: Tue, 8 Dec 2009 21:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200276 - stable/7/sys/geom/virstor X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 21:46:30 -0000 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);