Signed-off-by: Jens Axboe <axboe@kernel.dk>
helper_thread_create(startup_sem, sk_out);
cgroup_list = smalloc(sizeof(*cgroup_list));
helper_thread_create(startup_sem, sk_out);
cgroup_list = smalloc(sizeof(*cgroup_list));
- INIT_FLIST_HEAD(cgroup_list);
+ if (cgroup_list)
+ INIT_FLIST_HEAD(cgroup_list);
- cgroup_kill(cgroup_list);
- sfree(cgroup_list);
+ if (cgroup_list) {
+ cgroup_kill(cgroup_list);
+ sfree(cgroup_list);
+ }
sfree(cgroup_mnt);
fio_sem_remove(startup_sem);
sfree(cgroup_mnt);
fio_sem_remove(startup_sem);
+ if (!clist)
+ return 1;
+
if (!*mnt) {
*mnt = find_cgroup_mnt(td);
if (!*mnt)
if (!*mnt) {
*mnt = find_cgroup_mnt(td);
if (!*mnt)
f->file_name = strdup(file_name);
else
f->file_name = smalloc_strdup(file_name);
f->file_name = strdup(file_name);
else
f->file_name = smalloc_strdup(file_name);
- if (!f->file_name)
- assert(0);
+
+ /* can't handle smalloc failure from here */
+ assert(f->file_name);
__f->file_name = strdup(f->file_name);
else
__f->file_name = smalloc_strdup(f->file_name);
__f->file_name = strdup(f->file_name);
else
__f->file_name = smalloc_strdup(f->file_name);
- if (!__f->file_name)
- assert(0);
+ /* can't handle smalloc failure from here */
+ assert(__f->file_name);
__f->filetype = f->filetype;
}
__f->filetype = f->filetype;
}
return;
fio_ts = smalloc(sizeof(*fio_ts));
return;
fio_ts = smalloc(sizeof(*fio_ts));
- if (!fio_ts)
- log_err("fio: smalloc pool exhausted\n");
}
static void fio_gtod_update(void)
}
static void fio_gtod_update(void)