aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis A. Lozano <llozano@google.com>2017-09-05 16:20:44 -0700
committerJason Zaman <jason@perfinion.com>2017-10-29 20:58:03 +0800
commitf03529ffe355fcefbd94eedff4a8b27a9a24da00 (patch)
treea4b8be370034780779424437331ae01a9f99df22 /support
parentnetworkmanager: Module version bump. (diff)
downloadhardened-refpolicy-f03529ffe355fcefbd94eedff4a8b27a9a24da00.tar.gz
hardened-refpolicy-f03529ffe355fcefbd94eedff4a8b27a9a24da00.tar.bz2
hardened-refpolicy-f03529ffe355fcefbd94eedff4a8b27a9a24da00.zip
Avoid memory leak warning.
Using the LLVM static analyzer, we get a warning about leaked memory pointed by bcurrent. Since the warning happens within "main" and we don't care about deallocating the memory and just call "exit" which gets rid of the warning.
Diffstat (limited to 'support')
-rw-r--r--support/fc_sort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/support/fc_sort.c b/support/fc_sort.c
index 66cdf39f..a021ec50 100644
--- a/support/fc_sort.c
+++ b/support/fc_sort.c
@@ -512,7 +512,7 @@ int main(int argc, char *argv[])
if (!(bcurrent->next)) {
printf
("Error: failure allocating memory.\n");
- return -1;
+ exit(-1);
}
/* Make sure the new bucket thinks it's the end of the