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:
James Carter 2017-03-17 15:58:29 -04:00
parent 9087bb9c5a
commit dd11ab6f7f

View File

@ -654,6 +654,7 @@ int main(int argc, char **argv)
if (!debug) {
policydb_destroy(&policydb);
sepol_sidtab_destroy(&sidtab);
exit(0);
}