From 965a34fb62b5976cda71a16b0055bc73f44395cc Mon Sep 17 00:00:00 2001 From: Nate Lawson Date: Thu, 31 Mar 2005 19:07:26 +0000 Subject: [PATCH] Always free the returned env pointer even it doesn't indicate we're in verbose mode. Found by: Coverity Prevent (via sam) --- sys/dev/acpica/acpi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index ccb18ae7f516..167ed1ab0419 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -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); }