bootchart: oom-check correct variable
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
This commit is contained in:
parent
e10f3c431a
commit
d498a61607
|
@ -399,7 +399,7 @@ schedstat_next:
|
|||
continue;
|
||||
|
||||
ps->sample->next = new0(struct ps_sched_struct, 1);
|
||||
if (!ps->sample) {
|
||||
if (!ps->sample->next) {
|
||||
log_oom();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue