summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 8161c22e12..7c762516f5 100644
--- a/payloads/libpayload/drivers/options.c
+++ b/payloads/libpayload/drivers/options.c
@@ -309,7 +309,7 @@ int set_option_from_string(const struct nvram_accessor *nvram, struct cb_cmos_op
switch (cmos_entry->config) {
case 'h':
/* only works on little endian */
- raw = malloc(8);
+ raw = malloc(sizeof(u64));
*(u64*)raw = strtoull(value, NULL, 0);
break;
case 's':