From 80fba821988c5febcbfdad05ba23884382dd4683 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Fri, 11 Jun 2010 18:19:23 +0000 Subject: [PATCH] Fix a possible dereference of null pointer. Found by: clang static analyzer Found by: Coverity Prevent[tm] (CID 3423) --- sys/dev/acpi_support/acpi_hp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/acpi_support/acpi_hp.c b/sys/dev/acpi_support/acpi_hp.c index d3deed3a5bd6..83e4bf746e35 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); }