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:
parent
b9b03ba0bc
commit
0d84b47e9c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user