Skip to content
This repository has been archived by the owner on Feb 19, 2023. It is now read-only.

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
CCXXXI committed Jan 10, 2021
1 parent 8de8662 commit a6fc93c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/userprog/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ static void exit(int status)

while (!list_empty(&self->files))
{
struct open_file *f = list_entry(list_pop_back(&self->files),
struct open_file *f = list_entry(list_back(&self->files),
struct open_file, elem);
close(f->fd);
}
Expand Down

0 comments on commit a6fc93c

Please sign in to comment.