mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Closing file descriptors when it's done
This commit is contained in:
parent
b9895f9add
commit
a2299ad8e5
1 changed files with 2 additions and 0 deletions
|
|
@ -370,10 +370,12 @@ readboot(void)
|
|||
p[60] = (st.st_size + secsize - 1) / secsize;
|
||||
p[61] = 1;
|
||||
p[62] = 0;
|
||||
close(fd);
|
||||
return;
|
||||
} else if ((!alphacksum) && st.st_size <= BBSIZE) {
|
||||
if (read(fd, bootarea, st.st_size) != st.st_size)
|
||||
err(1, "read error %s", xxboot);
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
errx(1, "boot code %s is wrong size", xxboot);
|
||||
|
|
|
|||
Loading…
Reference in a new issue