diff options
author | jkim <jkim@FreeBSD.org> | 2010-06-11 18:19:23 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-06-11 18:19:23 +0000 |
commit | 2325aa45dbf3b3027cc8b306f15d929e129441ca (patch) | |
tree | 8e3d2213135c50b466d5ac429922c1ccdd6086de | |
parent | 09830f0c6f6176f6e31316658158ef9f89afb842 (diff) | |
download | FreeBSD-src-2325aa45dbf3b3027cc8b306f15d929e129441ca.zip FreeBSD-src-2325aa45dbf3b3027cc8b306f15d929e129441ca.tar.gz |
Fix a possible dereference of null pointer.
Found by: clang static analyzer
Found by: Coverity Prevent[tm] (CID 3423)
-rw-r--r-- | sys/dev/acpi_support/acpi_hp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/acpi_support/acpi_hp.c b/sys/dev/acpi_support/acpi_hp.c index d3deed3..83e4bf7 100644 --- a/sys/dev/acpi_support/acpi_hp.c +++ b/sys/dev/acpi_support/acpi_hp.c @@ -905,7 +905,7 @@ acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, UINT8 instance, 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); } |