On 4/27/22 4:20 AM, Ammar Faizi wrote:
threadstats = malloc(nr_ts * sizeof(struct thread_stat)); + if (!threadstats) { + log_err("fio: failed to allocate threadstats\n"); + return; + } + opt_lists = malloc(nr_ts * sizeof(struct flist_head *)); + if (!opt_lists) { + log_err("fio: failed to allocate opt_lists\n");
I should free(threadstats) here, will send v2 soon.
+ return; + }for (i = 0; i < nr_ts; i++) {init_thread_stat(&threadstats[i]);
-- Ammar Faizi