libroot_build: fs_darwin: fdopendir(): close FD on success
fdopendir() is supposed to consume the specified FD on success.
This commit is contained in:
committed by
Niels Sascha Reedijk
parent
f04f7042c5
commit
5fd3766e03
@@ -230,7 +230,11 @@ fdopendir(int fd)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return opendir(path);
|
DIR* dir = opendir(path);
|
||||||
|
if (dir != NULL)
|
||||||
|
close(fd);
|
||||||
|
|
||||||
|
return dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user