Fix memory leaks
This CL fixes leaks of the policy that we're building up. The analyzer only caught the leaks on the error path, but I assume that `check_assertions` does nothing to free the object that it's handed. Analyzer warnings: system/sepolicy/tools/sepolicy-analyze/neverallow.c:439:9: warning: Potential leak of memory pointed to by 'avrule' [clang-analyzer-unix.Malloc] system/sepolicy/tools/sepolicy-analyze/neverallow.c:439:9: warning: Potential leak of memory pointed to by 'neverallows' [clang-analyzer-unix.Malloc] Bug: None Test: Treehugger; reran the analyzer Change-Id: I79a0c34e8b53d33a1f01497337590eab660ad3ec
Loading
Please register or sign in to comment