From owner-cvs-src@FreeBSD.ORG Thu May 17 15:34:52 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1FB3716A400; Thu, 17 May 2007 15:34:52 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id ECD1A13C487; Thu, 17 May 2007 15:34:51 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l4HFYpfn087577; Thu, 17 May 2007 15:34:51 GMT (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l4HFYpc2087576; Thu, 17 May 2007 15:34:51 GMT (envelope-from marcel) Message-Id: <200705171534.l4HFYpc2087576@repoman.freebsd.org> From: Marcel Moolenaar Date: Thu, 17 May 2007 15:34:51 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sbin/geom/core geom.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2007 15:34:52 -0000 marcel 2007-05-17 15:34:51 UTC FreeBSD src repository Modified files: sbin/geom/core geom.c Log: Fix the construction of the gctl_req that got broken by my previous commit and that introduced optional parameters. Existing classes (like geli(8)) use empty strings by default and expect the parameter to be passed to the kernel as such. Also, the default value of a string argument can be NULL. Fix both cases by making the optional parameter conditional upon gc_argname being set and making sure to test for NULL before dereferencing the pointer. Reported by: brueffer@ Revision Changes Path 1.30 +3 -1 src/sbin/geom/core/geom.c