- 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

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