[coreboot-gerrit] New patch to review for coreboot: util/broadcom: close file on error
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Thu Dec 15 15:04:55 CET 2016
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17876
-gerrit
commit e9a4a697c50c46d28b48ccae971dcbe632c7c1b8
Author: Patrick Georgi <pgeorgi at chromium.org>
Date: Thu Dec 15 14:51:08 2016 +0100
util/broadcom: close file on error
Change-Id: I5193c6a9f08398b881c971c7175654ba5775b34a
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Found-by: Coverity Scan #1323509
---
util/broadcom/secimage/io.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/util/broadcom/secimage/io.c b/util/broadcom/secimage/io.c
index c32a06d..d71065c 100644
--- a/util/broadcom/secimage/io.c
+++ b/util/broadcom/secimage/io.c
@@ -81,6 +81,7 @@ int DataRead(char *filename, uint8_t *buf, int *length)
if (fread((uint8_t *)buf, 1, len, file) != len) {
printf("Error reading data (%d bytes) from file: %s\n",
len, filename);
+ fclose(file);
return -1;
}
fclose(file);
More information about the coreboot-gerrit
mailing list