From owner-svn-src-all@FreeBSD.ORG Fri Jun 11 18:19:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AE8F1065672; Fri, 11 Jun 2010 18:19:23 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B13A8FC18; Fri, 11 Jun 2010 18:19:23 +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 o5BIJNb2052601; Fri, 11 Jun 2010 18:19:23 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5BIJNDS052599; Fri, 11 Jun 2010 18:19:23 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201006111819.o5BIJNDS052599@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 11 Jun 2010 18:19:23 +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: r209055 - head/sys/dev/acpi_support X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2010 18:19:23 -0000 Author: jkim Date: Fri Jun 11 18:19:23 2010 New Revision: 209055 URL: http://svn.freebsd.org/changeset/base/209055 Log: Fix a possible dereference of null pointer. Found by: clang static analyzer Found by: Coverity Prevent[tm] (CID 3423) Modified: head/sys/dev/acpi_support/acpi_hp.c Modified: head/sys/dev/acpi_support/acpi_hp.c ============================================================================== --- head/sys/dev/acpi_support/acpi_hp.c Fri Jun 11 17:38:24 2010 (r209054) +++ head/sys/dev/acpi_support/acpi_hp.c Fri Jun 11 18:19:23 2010 (r209055) @@ -905,7 +905,7 @@ acpi_hp_get_cmi_block(device_t wmi_dev, return (-EINVAL); } obj = out.Pointer; - if (!obj && obj->Type != ACPI_TYPE_PACKAGE) { + if (!obj || obj->Type != ACPI_TYPE_PACKAGE) { acpi_hp_free_buffer(&out); return (-EINVAL); }