osmocon: Fix fd leak in error path of read_file()
Change-Id: Iaae407658df184277f6e6e07d6a48d8b5c75587b Closes: CID#198552
This commit is contained in:
parent
7f7a7c850e
commit
5b759f7f1e
|
@ -290,6 +290,7 @@ int read_file(const char *filename, int chainload)
|
|||
if ((st.st_size > MAX_DNLOAD_SIZE) && (dnload.mode != MODE_ROMLOAD)) {
|
||||
fprintf(stderr, "The maximum file size is 64kBytes (%u bytes)\n",
|
||||
MAX_DNLOAD_SIZE);
|
||||
close(fd);
|
||||
return -EFBIG;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue