diff options
| author | Aymeric Wibo <obiwac@FreeBSD.org> | 2026-03-21 05:19:21 +0000 |
|---|---|---|
| committer | Aymeric Wibo <obiwac@FreeBSD.org> | 2026-03-21 05:20:46 +0000 |
| commit | a87bde85232e60771691649fd5718a6de5453e59 (patch) | |
| tree | 8155376c75747d6b0b71289dd3ac7ee4a5115db0 | |
| parent | 2547f972022197012cb3170ab4d6dcd8cd0ee257 (diff) | |
| -rw-r--r-- | sys/dev/acpica/acpi_spmc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c index 6b4363bb364d..a961b4a188dc 100644 --- a/sys/dev/acpica/acpi_spmc.c +++ b/sys/dev/acpica/acpi_spmc.c @@ -274,13 +274,9 @@ acpi_spmc_check_dsm_set(struct acpi_spmc_softc *sc, ACPI_HANDLE handle, static void acpi_spmc_free_constraints(struct acpi_spmc_softc *sc) { - if (sc->constraints == NULL) - return; - - for (size_t i = 0; i < sc->constraint_count; i++) { - if (sc->constraints[i].name != NULL) - free(sc->constraints[i].name, M_TEMP); - } + for (size_t i = 0; i < sc->constraint_count; i++) + free(sc->constraints[i].name, M_TEMP); + sc->constraint_count = 0; free(sc->constraints, M_TEMP); sc->constraints = NULL; |
