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:
parent
bdc8c83614
commit
9a4114a15a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue