Skip to content

Commit ccf9897

Browse files
boot: Always impl Drop for MemoryMapBackingMemory
Gating this on `cfg(not(test))` isn't necessary; during unit tests `system_table_boot()` will return `None` and so the drop won't do anything anyway. Also fix a typo, excited -> exited.
1 parent 1fa9408 commit ccf9897

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

uefi/src/table/boot.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1737,8 +1737,6 @@ impl MemoryMapBackingMemory {
17371737
}
17381738
}
17391739

1740-
// Don't drop when we use this in unit tests.
1741-
#[cfg(not(test))]
17421740
impl Drop for MemoryMapBackingMemory {
17431741
fn drop(&mut self) {
17441742
if let Some(bs) = system_table_boot() {
@@ -1747,7 +1745,7 @@ impl Drop for MemoryMapBackingMemory {
17471745
log::error!("Failed to deallocate memory map: {e:?}");
17481746
}
17491747
} else {
1750-
log::debug!("Boot services are excited. Memory map won't be freed using the UEFI boot services allocator.");
1748+
log::debug!("Boot services are exited. Memory map won't be freed using the UEFI boot services allocator.");
17511749
}
17521750
}
17531751
}

0 commit comments

Comments
 (0)