From owner-svn-src-head@FreeBSD.ORG Sat Nov 29 14:20:37 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09CFE1065673; Sat, 29 Nov 2008 14:20:37 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 020658FC18; Sat, 29 Nov 2008 14:20:37 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mATEKaCL053438; Sat, 29 Nov 2008 14:20:36 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mATEKa6t053437; Sat, 29 Nov 2008 14:20:36 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200811291420.mATEKa6t053437@svn.freebsd.org> From: Rui Paulo Date: Sat, 29 Nov 2008 14:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185433 - head/sys/dev/asmc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2008 14:20:37 -0000 Author: rpaulo Date: Sat Nov 29 14:20:36 2008 New Revision: 185433 URL: http://svn.freebsd.org/changeset/base/185433 Log: Check for non-existing model DMI string. Submitted by: ganbold Found with: Coverity Prevent(tm) CID: 2434 MFC after: 1 week Modified: head/sys/dev/asmc/asmc.c Modified: head/sys/dev/asmc/asmc.c ============================================================================== --- head/sys/dev/asmc/asmc.c Sat Nov 29 13:34:59 2008 (r185432) +++ head/sys/dev/asmc/asmc.c Sat Nov 29 14:20:36 2008 (r185433) @@ -254,6 +254,9 @@ asmc_match(device_t dev) char *model; model = getenv("smbios.system.product"); + if (model == NULL) + return (NULL); + for (i = 0; asmc_models[i].smc_model; i++) { if (!strncmp(model, asmc_models[i].smc_model, strlen(model))) { freeenv(model);