Skip to content

Commit 0808c97

Browse files
committed
Bugfix, squash this later
Signed-off-by: Ludvig Liljenberg <[email protected]>
1 parent 894f5fe commit 0808c97

File tree

1 file changed

+6
-2
lines changed
  • src/hyperlight_host/src/mem

1 file changed

+6
-2
lines changed

src/hyperlight_host/src/mem/mgr.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,12 @@ where
337337
None => {
338338
log_then_return!("Snapshot manager not initialized");
339339
}
340-
Some(snapshot_manager) => snapshot_manager
341-
.pop_and_restore_state_from_snapshot(&mut self.shared_mem, dirty_bitmap),
340+
Some(snapshot_manager) => {
341+
let old_rgns = self.mapped_rgns;
342+
self.mapped_rgns = snapshot_manager
343+
.pop_and_restore_state_from_snapshot(&mut self.shared_mem, dirty_bitmap)?;
344+
Ok(old_rgns - self.mapped_rgns)
345+
}
342346
}
343347
}
344348

0 commit comments

Comments
 (0)