Skip to content

Commit

Permalink
thanks mataness
Browse files Browse the repository at this point in the history
  • Loading branch information
kaashoek committed Aug 30, 2018
1 parent 26108a3 commit 171c2cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 171c2cc

Please sign in to comment.