Coverity warned that we have already dereferenced ps->sample before
null-checking it. I suspect that's not really the issue and that
the check is checking the wrong variable.
Likely the oom-check should be on the just allocated ps->sample->next.
Found by coverity. Fixes: CID#
1237765
continue;
ps->sample->next = new0(struct ps_sched_struct, 1);
continue;
ps->sample->next = new0(struct ps_sched_struct, 1);
+ if (!ps->sample->next) {
log_oom();
exit(EXIT_FAILURE);
}
log_oom();
exit(EXIT_FAILURE);
}