mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-12-14 15:08:50 +00:00
checkpolicy: check return code on ebitmap_set_bit
This can fail due to ENOMEM. Check and return code and return error if necessary. Signed-off-by: Eric Paris <eparis@redhat.com>
This commit is contained in:
parent
87e8d46f29
commit
873c176651
@ -2341,7 +2341,10 @@ int define_role_trans(int class_specified)
|
||||
return -1;
|
||||
}
|
||||
|
||||
ebitmap_set_bit(&e_classes, cladatum->s.value - 1, TRUE);
|
||||
if (ebitmap_set_bit(&e_classes, cladatum->s.value - 1, TRUE)) {
|
||||
yyerror("out of memory");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
id = (char *)queue_remove(id_queue);
|
||||
|
Loading…
Reference in New Issue
Block a user