mirror of
https://github.com/SELinuxProject/selinux
synced 2025-03-07 02:37:41 +00:00
libsepol/cil: free bitmaps in cil_level_equals()
cil_level_equals() builds two bitmap and compare them but does not destroy them before returning the result. This memory leak has been found by running clang's Address Sanitizer on a set of policies generated by American Fuzzy Lop. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
9feaf0380d
commit
95e5c103f3
@ -1299,7 +1299,9 @@ static int cil_level_equals(struct cil_level *low, struct cil_level *high)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
return ebitmap_cmp(&elow, &ehigh);
|
||||
rc = ebitmap_cmp(&elow, &ehigh);
|
||||
ebitmap_destroy(&elow);
|
||||
ebitmap_destroy(&ehigh);
|
||||
|
||||
exit:
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user