summaryrefslogtreecommitdiffstats
path: root/ogp_spi.c
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2014-04-26 16:11:50 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-04-26 16:11:50 +0000
commita9c23427918159f5ddae861d9b6b30970e95fd34 (patch)
treed626a9cfa5210081e97cf31653976dafa4ea777b /ogp_spi.c
parent4c00d09cc01ef060aabfb517e069f3732933aa10 (diff)
downloadast2050-flashrom-a9c23427918159f5ddae861d9b6b30970e95fd34.zip
ast2050-flashrom-a9c23427918159f5ddae861d9b6b30970e95fd34.tar.gz
CID1130007: Resource leak in ogp_spi
Memory leak in ogp_spi_init(). Corresponding to flashrom svn r1774. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'ogp_spi.c')
-rw-r--r--ogp_spi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ogp_spi.c b/ogp_spi.c
index f8f7b2d..23431d1 100644
--- a/ogp_spi.c
+++ b/ogp_spi.c
@@ -120,8 +120,10 @@ int ogp_spi_init(void)
ogp_reg_sck = OGA1_XP10_CPROM_SCK;
} else {
msg_perr("Invalid or missing rom= parameter.\n");
+ free(type);
return 1;
}
+ free(type);
if (rget_io_perms())
return 1;
OpenPOWER on IntegriCloud