svn commit: r209055 - head/sys/dev/acpi_support
Jung-uk Kim
jkim at FreeBSD.org
Fri Jun 11 18:19:23 UTC 2010
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);
}
More information about the svn-src-head
mailing list