Fix fd leak. Threads people: does the call above to `access' need to be

underscored as well?

PR:		37717
Submitted by:	fred@clift.org (slightly modified by me)
This commit is contained in:
Garrett Wollman 2002-05-03 17:28:28 +00:00
parent b9b03ba0bc
commit 0d84b47e9c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95989

View File

@ -316,8 +316,10 @@ struct state * const sp;
return -1;
if ((fid = _open(name, OPEN_MODE)) == -1)
return -1;
if ((_fstat(fid, &stab) < 0) || !S_ISREG(stab.st_mode))
if ((_fstat(fid, &stab) < 0) || !S_ISREG(stab.st_mode)) {
_close(fid);
return -1;
}
}
{
struct tzhead * tzhp;