Skip to content

Commit d973341

Browse files
committed
uefi: fix panic in MemoryMapBackingMemory in unit tests
The panic occurs because system_table_boot() panics as no pointer to the system table was saved anywhere.
1 parent 022cc45 commit d973341

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

uefi/src/table/boot.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1742,6 +1742,8 @@ impl MemoryMapBackingMemory {
17421742
}
17431743
}
17441744

1745+
// Don't drop when we use this in unit tests.
1746+
#[cfg(not(test))]
17451747
impl Drop for MemoryMapBackingMemory {
17461748
fn drop(&mut self) {
17471749
if let Some(bs) = system_table_boot() {

0 commit comments

Comments
 (0)