mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-16 15:11:52 +00:00
- Close fd if fdopen(fd) fails.
- Format return () to resemble the one 5 lines up.
This commit is contained in:
parent
a2165cbdce
commit
e99c7b0d2c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129683
@ -588,7 +588,8 @@ validate_access(char **filep, int mode)
|
||||
return (errno + 100);
|
||||
file = fdopen(fd, (mode == RRQ)? "r":"w");
|
||||
if (file == NULL) {
|
||||
return errno+100;
|
||||
close(fd);
|
||||
return (errno + 100);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user