Message ID | 20230208093016.20670-2-ilpo.jarvinen@linux.intel.com |
---|---|
State | Accepted |
Commit | 22a8be280383812235131dda18a8212a59fadd2d |
Headers | show |
Series | [1/4] selftests/resctrl: Return error if memory is not allocated | expand |
diff --git a/tools/testing/selftests/resctrl/fill_buf.c b/tools/testing/selftests/resctrl/fill_buf.c index 56ccbeae0638..f4880c962ec4 100644 --- a/tools/testing/selftests/resctrl/fill_buf.c +++ b/tools/testing/selftests/resctrl/fill_buf.c @@ -68,6 +68,8 @@ static void *malloc_and_init_memory(size_t s) size_t s64; void *p = memalign(PAGE_SIZE, s); + if (!p) + return p; p64 = (uint64_t *)p; s64 = s / sizeof(uint64_t);