thanks mataness

This commit is contained in:
Frans Kaashoek 2018-08-30 13:30:50 -04:00
parent 26108a3b99
commit 171c2cc6b8

4
vm.c
View file

@ -332,8 +332,10 @@ copyuvm(pde_t *pgdir, uint sz)
if((mem = kalloc()) == 0) if((mem = kalloc()) == 0)
goto bad; goto bad;
memmove(mem, (char*)P2V(pa), PGSIZE); memmove(mem, (char*)P2V(pa), PGSIZE);
if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0) if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0) {
kfree(mem);
goto bad; goto bad;
}
} }
return d; return d;