summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
authorMathias Krause <mathias.krause@secunet.com>2012-02-08 10:31:42 +0100
committerPeter Stuge <peter@stuge.se>2012-02-10 15:15:01 +0100
commit9a4114a15a4a63d059923c54ab08d392ca856c03 (patch)
tree3e37661dc76634b6d03f00f57512bd542e5d17e2 /payloads
parentbdc8c83614f18ff87e978a0b1d60a27a61ec7c0d (diff)
downloadcoreboot-9a4114a15a4a63d059923c54ab08d392ca856c03.tar.xz
libpayload: fix possible mem leak in get_option_as_string()
Change-Id: I7c3adbd1b72be81585bbaabb42532fc4cad57f58 Signed-off-by: Mathias Krause <mathias.krause@secunet.com> Reviewed-on: http://review.coreboot.org/616 Tested-by: build bot (Jenkins) Reviewed-by: Peter Stuge <peter@stuge.se>
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/drivers/options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/options.c b/payloads/libpayload/drivers/options.c
index 10d165ecc7..8161c22e12 100644
--- a/payloads/libpayload/drivers/options.c
+++ b/payloads/libpayload/drivers/options.c
@@ -292,7 +292,7 @@ int get_option_as_string(const struct nvram_accessor *nvram, struct cb_cmos_opti
*dest = strdup((const char*)cmos_enum->text);
break;
default: /* fail */
- return 1;
+ ret = 1;
}
free(raw);
return ret;