aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/test/run-malloc-speed.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/test/run-malloc-speed.c b/core/test/run-malloc-speed.c
index edc7589..18c0de9 100644
--- a/core/test/run-malloc-speed.c
+++ b/core/test/run-malloc-speed.c
@@ -75,7 +75,9 @@ void unlock(struct lock *l)
int main(void)
{
uint64_t i, len;
- void *p[NUM_ALLOCS];
+ void **p = real_malloc(sizeof(void*)*NUM_ALLOCS);
+
+ assert(p);
/* Use malloc for the heap, so valgrind can find issues. */
skiboot_heap.start = (unsigned long)real_malloc(skiboot_heap.len);
@@ -90,5 +92,6 @@ int main(void)
assert(mem_check(&skiboot_heap));
assert(mem_region_lock.lock_val == 0);
free(region_start(&skiboot_heap));
+ real_free(p);
return 0;
}