mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-11-24 12:09:50 +00:00
checkpolicy: Fix minor memory leak in checkpolicy
sepol_set_sidtab() is called without calling sepol_sidtab_destroy(). This is not a big deal, since checkpolicy does not run for long, but it does add noise when checking for other, more important, leaks. Call sepol_sidtab_destroy() before exiting if not in debug mode. Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
This commit is contained in:
parent
9087bb9c5a
commit
dd11ab6f7f
@ -654,6 +654,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (!debug) {
|
||||
policydb_destroy(&policydb);
|
||||
sepol_sidtab_destroy(&sidtab);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user