projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Make pagedir_destroy(NULL) a no-op.
[pintos-anon]
/
src
/
userprog
/
pagedir.c
diff --git
a/src/userprog/pagedir.c
b/src/userprog/pagedir.c
index bfcda457512574f85f06b1c950a08fe15117621a..1edd0ff1931f84888a922558fe73ac0f78365f95 100644
(file)
--- a/
src/userprog/pagedir.c
+++ b/
src/userprog/pagedir.c
@@
-19,6
+19,9
@@
pagedir_destroy (uint32_t *pd)
{
uint32_t *pde;
+ if (pd == NULL)
+ return;
+
for (pde = pd; pde < pd + pd_no (PHYS_BASE); pde++)
if (*pde & PG_P)
{