summaryrefslogtreecommitdiffstats
path: root/layout.c
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2014-04-26 16:11:39 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-04-26 16:11:39 +0000
commitc7d1bb1b4adbf14d72dd36edf519c14a33bc826a (patch)
treed229d7d5cc151ba176e9e25a9bae1f6cc1e7cf30 /layout.c
parent3598145bb1bea342bed8fb114557b4065b209873 (diff)
downloadflashrom-c7d1bb1b4adbf14d72dd36edf519c14a33bc826a.zip
flashrom-c7d1bb1b4adbf14d72dd36edf519c14a33bc826a.tar.gz
CID1130008: Resource leak read_romlayout()
Corresponding to flashrom svn r1773. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/layout.c b/layout.c
index 08cc776..0e49f19 100644
--- a/layout.c
+++ b/layout.c
@@ -65,6 +65,7 @@ int read_romlayout(char *name)
if (num_rom_entries >= MAX_ROMLAYOUT) {
msg_gerr("Maximum number of ROM images (%i) in layout "
"file reached.\n", MAX_ROMLAYOUT);
+ fclose(romlayout);
return 1;
}
if (2 != fscanf(romlayout, "%s %s\n", tempstr, rom_entries[num_rom_entries].name))
OpenPOWER on IntegriCloud