⬢ DragonFlyBSD Kernel Audit
DF-4287 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/acpica/acpi_thinkpad/acpi_thinkpad.c
+++ b/sys/dev/acpica/acpi_thinkpad/acpi_thinkpad.c
@@ -619,7 +619,10 @@ acpi_thinkpad_attach(device_t dev)
 	}
 
 nosmbios:
-	kfreeenv(maker);
-	kfreeenv(product);
+	if (maker != NULL)
+		kfreeenv(maker);
+	if (product != NULL)
+		kfreeenv(product);
 
 	/* Enable events by default. */
 	ACPI_SERIAL_BEGIN(thinkpad);