summaryrefslogtreecommitdiffstats
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
commit6c229823bd852e3500b61c8c49ccc2a5b5ddb9f0 (patch)
treed626a9cfa5210081e97cf31653976dafa4ea777b
parentc7d1bb1b4adbf14d72dd36edf519c14a33bc826a (diff)
downloadflashrom-6c229823bd852e3500b61c8c49ccc2a5b5ddb9f0.zip
flashrom-6c229823bd852e3500b61c8c49ccc2a5b5ddb9f0.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>
-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