mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-04 09:09:56 +00:00
MFV r322231:
8430 dir_is_empty_readdir() doesn't properly handle error from fdopendir()
illumos/illumos-gate@ba6e7e6505
ba6e7e6505
https://www.illumos.org/issues/8430
we should close dirfd if fdopendir() fails.
Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Sowrabha Gopal <sowrabha.gopal@delphix.com>
This commit is contained in:
commit
73c9b6d523
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329691
@ -216,6 +216,7 @@ dir_is_empty_readdir(const char *dirname)
|
||||
}
|
||||
|
||||
if ((dirp = fdopendir(dirfd)) == NULL) {
|
||||
(void) close(dirfd);
|
||||
return (B_TRUE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user