From 9a4114a15a4a63d059923c54ab08d392ca856c03 Mon Sep 17 00:00:00 2001 From: Mathias Krause Date: Wed, 8 Feb 2012 10:31:42 +0100 Subject: libpayload: fix possible mem leak in get_option_as_string() Change-Id: I7c3adbd1b72be81585bbaabb42532fc4cad57f58 Signed-off-by: Mathias Krause Reviewed-on: http://review.coreboot.org/616 Tested-by: build bot (Jenkins) Reviewed-by: Peter Stuge --- payloads/libpayload/drivers/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'payloads/libpayload') 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; -- cgit v1.2.3