From: Robert Elliott Date: Sat, 13 Dec 2014 04:50:30 +0000 (-0700) Subject: eta.c: check malloc return code X-Git-Tag: fio-2.2.0~18^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=70034d87976e9175054b8c5d7b32f28be638570f;p=fio.git eta.c: check malloc return code Check the malloc return code in get_jobs_eta. Signed-off-by: Robert Elliott Signed-off-by: Jens Axboe --- diff --git a/eta.c b/eta.c index a90f1fb4..167bf5f6 100644 --- a/eta.c +++ b/eta.c @@ -572,6 +572,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)) {