procfs: check parent entry to avoid page fault in procfs_exit()

This commit is contained in:
Balazs Gerofi
2015-01-31 22:27:04 -08:00
parent 5f5ab34559
commit a5bdd41c3d

View File

@@ -462,7 +462,9 @@ void procfs_exit(int osnum) {
} else {
r += 1;
}
remove_proc_entry(r, parent->entry);
if (parent) {
remove_proc_entry(r, parent->entry);
}
dprintk("free the entry\n");
kfree(e);
}