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>
This commit is contained in:
Mathias Krause 2012-02-08 10:31:42 +01:00 committed by Peter Stuge
parent bdc8c83614
commit 9a4114a15a
1 changed files with 1 additions and 1 deletions

View File

@ -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); *dest = strdup((const char*)cmos_enum->text);
break; break;
default: /* fail */ default: /* fail */
return 1; ret = 1;
} }
free(raw); free(raw);
return ret; return ret;