@@ -29,6 +29,7 @@ int cDirectoryFsync(char *path)
2929
3030 if(!S_ISDIR(fdstat.st_mode))
3131 {
32+ close(fd);
3233 return ENOTDIR;
3334 }
3435
@@ -43,6 +44,7 @@ int cDirectoryFsync(char *path)
4344 {
4445 return errno;
4546 }
47+ close(fd);
4648 return 0;
4749}
4850#endif