Fsutil_ls must close the directory after reading it
[pintos-anon] / src / filesys / fsutil.c
index 447f29131c8395cb36f30c0fb24fff0f7f19fccb..5f045d64a5ad076f02d686007687d0a93a082f90 100644 (file)
@@ -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");
 }