1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

- Close fd if fdopen(fd) fails.

- Format return () to resemble the one 5 lines up.
This commit is contained in:
Matthew N. Dodd 2004-05-25 01:40:27 +00:00
parent a2165cbdce
commit e99c7b0d2c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129683

View File

@ -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);
}