checkpolicy: free identifiers on invalid typebounds
Free the two identifiers on an invalid typebounds in the error branch, similar to the success branch. Reported-by: oss-fuzz (issue 67700) Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
39b3cc5135
commit
9f2f9e2847
|
@ -1477,8 +1477,12 @@ int define_typebounds(void)
|
|||
}
|
||||
|
||||
while ((id = queue_remove(id_queue))) {
|
||||
if (define_typebounds_helper(bounds, id))
|
||||
if (define_typebounds_helper(bounds, id)) {
|
||||
free(bounds);
|
||||
free(id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
free(id);
|
||||
}
|
||||
free(bounds);
|
||||
|
|
Loading…
Reference in New Issue