Commit e94de5d9 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Close the fd on failure.

Spotted by: Coverity
parent 69a521d1
......@@ -127,6 +127,7 @@ read_file(const char *fn)
s = read(fd, buf, sz - 1);
if (s <= 0) {
free(buf);
(void)close(fd);
return (NULL);
}
AZ(close (fd));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment