diff options
author | Andrea Monaco <andrea.monaco@autistici.org> | 2021-11-21 20:21:33 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2021-11-21 20:22:33 +0100 |
commit | 0cf650f0459def7d1929c5274a71df8630ef96cc (patch) | |
tree | 703aa509181a670ec1503c25fa844af0dfa615ea /acpi | |
parent | b250fa1cb98d2e2b44a8dd7c2275c6c9e04519e1 (diff) | |
download | hurd-0cf650f0459def7d1929c5274a71df8630ef96cc.tar.gz hurd-0cf650f0459def7d1929c5274a71df8630ef96cc.tar.bz2 hurd-0cf650f0459def7d1929c5274a71df8630ef96cc.zip |
acpi: Unignore some mmap failure
* acpi/acpi.c (acpi_get_num_tables): Do not ignore mmap failure.
Diffstat (limited to 'acpi')
-rw-r--r-- | acpi/acpi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/acpi/acpi.c b/acpi/acpi.c index a6ad1609..94b449a9 100644 --- a/acpi/acpi.c +++ b/acpi/acpi.c @@ -138,6 +138,11 @@ acpi_get_num_tables(size_t *num_tables) err = mmap_phys_acpi_header(acpi_ptr32, &next, &virt_addr2, fd_mem); } + if (err) { + munmap(virt_addr, ESCD_SIZE); + return err; + } + if (next->signature[0] == '\0' || next->length == 0) { munmap(virt_addr2, ESCD_SIZE); continue; |