Sepolicy-Analyze: Plug leak

Destroy the policy before exiting (for successful = expected runs).

Bug: 37757759
Test: ASAN_OPTIONS= SANITIZE_HOST=address m
Change-Id: I67e35fbede696ec020a53b69a6cef9f374fae167
This commit is contained in:
Andreas Gampe 2017-04-27 18:16:26 -07:00
parent 608969b33f
commit ee8b67dfd9

View file

@ -57,6 +57,7 @@ int main(int argc, char **argv)
rc = analyze_components[i].func(argc - 2, argv + 2, &policydb);
if (rc && USAGE_ERROR) {
usage(argv[0]); }
policydb_destroy(&policydb);
return rc;
}
}