Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 2010 18:19:23 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r209055 - head/sys/dev/acpi_support
Message-ID:  <201006111819.o5BIJNDS052599@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006111819.o5BIJNDS052599>