summaryrefslogtreecommitdiff
path: root/firmware/stub/vboot_api_stub_stream.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2016-10-18 14:41:22 -0700
committerRandall Spangler <rspangler@chromium.org>2016-11-06 02:33:50 +0000
commit559a110f33b7ebe8d950f1c2de6b3b89791f862b (patch)
tree7853ac7a1f8a47cc981613e632f55cdc7dc33974 /firmware/stub/vboot_api_stub_stream.c
parent47eeaa6e4a03d2689c9b1b46fc9b0b0b04ace3a6 (diff)
downloadvboot-559a110f33b7ebe8d950f1c2de6b3b89791f862b.tar.gz
vboot: use malloc and free directly
Originally, vboot1 code used VbExMalloc() and VbExFree() since it needed to talk to EFI firmware that didn't have standard malloc() and free(). Now, coreboot and depthcharge implement them as wrappers around those standard calls. vboot2 code already calls them directly, so let vboot1 code do that too. BUG=chromium:611535 BRANCH=none TEST=make runtests; emerge-kevin coreboot depthcharge Change-Id: I49ad0e32e38d278dc3589bfaf494bcf0e4b0a4bd Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/400905
Diffstat (limited to 'firmware/stub/vboot_api_stub_stream.c')
-rw-r--r--firmware/stub/vboot_api_stub_stream.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/firmware/stub/vboot_api_stub_stream.c b/firmware/stub/vboot_api_stub_stream.c
index 525c8f78..c65259d3 100644
--- a/firmware/stub/vboot_api_stub_stream.c
+++ b/firmware/stub/vboot_api_stub_stream.c
@@ -7,8 +7,6 @@
#include <stdint.h>
-#define _STUB_IMPLEMENTATION_
-
#include "vboot_api.h"
/* The stub implementation assumes 512-byte disk sectors */
@@ -36,7 +34,7 @@ VbError_t VbExStreamOpen(VbExDiskHandle_t handle, uint64_t lba_start,
return VBERROR_UNKNOWN;
}
- s = VbExMalloc(sizeof(*s));
+ s = malloc(sizeof(*s));
s->handle = handle;
s->sector = lba_start;
s->sectors_left = lba_count;
@@ -82,6 +80,6 @@ void VbExStreamClose(VbExStream_t stream)
if (!s)
return;
- VbExFree(s);
+ free(s);
return;
}