libroot_build: fs_darwin: fdopendir(): close FD on success

fdopendir() is supposed to consume the specified FD on success.
This commit is contained in:
Ingo Weinhold
2013-09-30 21:41:56 +02:00
committed by Niels Sascha Reedijk
parent f04f7042c5
commit 5fd3766e03
+5 -1
View File
@@ -230,7 +230,11 @@ fdopendir(int fd)
return NULL;
}
return opendir(path);
DIR* dir = opendir(path);
if (dir != NULL)
close(fd);
return dir;
}