Fix a possible dereference of null pointer.

Found by:	clang static analyzer
Found by:	Coverity Prevent[tm] (CID 3423)
This commit is contained in:
Jung-uk Kim 2010-06-11 18:19:23 +00:00
parent d19511c357
commit 80fba82198

View File

@ -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);
}