diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c index 8a8cb6ea4f3a..6482b3f1b244 100644 --- a/sys/dev/acpica/acpi_ec.c +++ b/sys/dev/acpica/acpi_ec.c @@ -434,9 +434,7 @@ acpi_ec_probe(device_t dev) params->gpe_bit, (params->glk) ? ", GLK" : "", ecdt ? ", ECDT" : ""); device_set_desc_copy(dev, desc); - } - - if (ret > 0 && params) + } else free(params, M_TEMP); if (buf.Pointer) AcpiOsFree(buf.Pointer);