thanks mataness
This commit is contained in:
parent
26108a3b99
commit
171c2cc6b8
1 changed files with 3 additions and 1 deletions
4
vm.c
4
vm.c
|
@ -332,8 +332,10 @@ copyuvm(pde_t *pgdir, uint sz)
|
|||
if((mem = kalloc()) == 0)
|
||||
goto bad;
|
||||
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;
|
||||
}
|
||||
}
|
||||
return d;
|
||||
|
||||
|
|
Loading…
Reference in a new issue