X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=eta.c;h=e458457a902f4df3fc3e6642c402abf6148c7016;hb=e81ecca33755eae1118b009d0d7b4d3c740ffb5f;hp=a90f1fb4763758eaedc9130036a2d60b720fc9bc;hpb=256bc54c13ba8b37eb0e08fdbbd1bbbcfe8a86cc;p=fio.git diff --git a/eta.c b/eta.c index a90f1fb4..e458457a 100644 --- a/eta.c +++ b/eta.c @@ -6,6 +6,7 @@ #include #include "fio.h" +#include "lib/pow2.h" static char __run_str[REAL_MAX_JOBS + 1]; static char run_str[__THREAD_RUNSTR_SZ(REAL_MAX_JOBS)]; @@ -572,6 +573,8 @@ struct jobs_eta *get_jobs_eta(int force, size_t *size) *size = sizeof(*je) + THREAD_RUNSTR_SZ; je = malloc(*size); + if (!je) + return NULL; memset(je, 0, *size); if (!calc_thread_status(je, force)) {