thanks mataness
This commit is contained in:
parent
26108a3b99
commit
171c2cc6b8
4
vm.c
4
vm.c
|
@ -332,9 +332,11 @@ 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;
|
||||||
|
|
||||||
bad:
|
bad:
|
||||||
|
|
Loading…
Reference in a new issue