From dd11ab6f7f412fc6d20885fedc9fe5b12fccd49c Mon Sep 17 00:00:00 2001 From: James Carter Date: Fri, 17 Mar 2017 15:58:29 -0400 Subject: [PATCH] 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 --- checkpolicy/checkpolicy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/checkpolicy/checkpolicy.c b/checkpolicy/checkpolicy.c index b98bfcd1..b744d6a4 100644 --- a/checkpolicy/checkpolicy.c +++ b/checkpolicy/checkpolicy.c @@ -654,6 +654,7 @@ int main(int argc, char **argv) if (!debug) { policydb_destroy(&policydb); + sepol_sidtab_destroy(&sidtab); exit(0); }