From: John Ousterhout Date: Thu, 17 Dec 2015 19:36:48 +0000 (-0800) Subject: Fsutil_ls must close the directory after reading it X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5b36e99194eb47a4b0db6b01797af33256d6ae4;p=pintos-anon Fsutil_ls must close the directory after reading it --- diff --git a/src/filesys/fsutil.c b/src/filesys/fsutil.c index 447f291..5f045d6 100644 --- a/src/filesys/fsutil.c +++ b/src/filesys/fsutil.c @@ -24,6 +24,7 @@ fsutil_ls (char **argv UNUSED) PANIC ("root dir open failed"); while (dir_readdir (dir, name)) printf ("%s\n", name); + dir_close (dir); printf ("End of listing.\n"); }