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=bb0485f5561709b2d9a97fdeda9bfa1bd55a20c9;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"); }