laforge has submitted this change and it was merged. (
https://gerrit.osmocom.org/c/osmocom-bb/+/14850 )
Change subject: osmocon: Fix fd leak in error path of read_file()
......................................................................
osmocon: Fix fd leak in error path of read_file()
Change-Id: Iaae407658df184277f6e6e07d6a48d8b5c75587b
Closes: CID#198552
---
M src/host/osmocon/osmocon.c
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c
index 9090d27..9237214 100644
--- a/src/host/osmocon/osmocon.c
+++ b/src/host/osmocon/osmocon.c
@@ -290,6 +290,7 @@
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 {
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/14850
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Iaae407658df184277f6e6e07d6a48d8b5c75587b
Gerrit-Change-Number: 14850
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-MessageType: merged