summaryrefslogtreecommitdiff
path: root/src/kernel/mem/paging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/mem/paging.cpp')
-rw-r--r--src/kernel/mem/paging.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kernel/mem/paging.cpp b/src/kernel/mem/paging.cpp
index eb7e615..496b70c 100644
--- a/src/kernel/mem/paging.cpp
+++ b/src/kernel/mem/paging.cpp
@@ -109,7 +109,7 @@ page_directory *pagedir_new() {
void pagedir_delete(page_directory *pd) {
uint32_t i;
//Unmap segments
- while (pd->mappedSegs != 0) seg_unmap(pd->mappedSegs);
+ while (pd->mappedSegs != 0) pd->mappedSegs->seg->unmap(pd->mappedSegs);
//Cleanup page tables
for (i = 0; i < FIRST_KERNEL_PAGETABLE; i++) {
kfree_page(pd->tables[i]);
@@ -133,7 +133,9 @@ uint32_t paging_fault(registers *regs) {
}
if (seg != 0) {
- if (seg->seg->handle_fault(seg, addr, (regs->err_code & 0x2) && (regs->eip < K_HIGHHALF_ADDR)) != 0) seg = 0;
+ if (seg->seg->handle_fault(seg, addr, (regs->err_code & 0x2) && (regs->eip < K_HIGHHALF_ADDR)) != 0) {
+ seg = 0;
+ }
}
if (seg == 0) {