commit | 106a06b56dc88be77cb08806b9343f8a83ca473b | [log] [tgz] |
---|---|---|
author | Robert Elliott <elliott@hp.com> | Fri Dec 12 21:50:30 2014 -0700 |
committer | Mohamad Ayyash <mkayyash@google.com> | Fri Mar 06 17:58:07 2015 -0800 |
tree | 1a8c217060944ef63520e8df2e7c24151c11defc | |
parent | b2c52da8436eac7a09a22613f600b76c45c8d0e2 [diff] |
eta.c: check malloc return code Check the malloc return code in get_jobs_eta. Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/eta.c b/eta.c index a90f1fb..167bf5f 100644 --- a/eta.c +++ b/eta.c
@@ -572,6 +572,8 @@ *size = sizeof(*je) + THREAD_RUNSTR_SZ; je = malloc(*size); + if (!je) + return NULL; memset(je, 0, *size); if (!calc_thread_status(je, force)) {