Always free the returned env pointer even it doesn't indicate we're in

verbose mode.

Found by:	Coverity Prevent (via sam)
This commit is contained in:
Nate Lawson 2005-03-31 19:07:26 +00:00
parent 71ab130c9b
commit 965a34fb62

View File

@ -528,8 +528,9 @@ acpi_attach(device_t dev)
sc->acpi_sleep_delay = 1;
if (bootverbose)
sc->acpi_verbose = 1;
if ((env = getenv("hw.acpi.verbose")) && strcmp(env, "0")) {
sc->acpi_verbose = 1;
if ((env = getenv("hw.acpi.verbose")) != NULL) {
if (strcmp(env, "0") != 0)
sc->acpi_verbose = 1;
freeenv(env);
}