diff --git a/tools/fc_sort/fc_sort.c b/tools/fc_sort/fc_sort.c index 9a3a3ee14974ccb06c388dd8228372f032d8b4bb..fcd62eb4437a64a98e300736b40092c21351fef7 100644 --- a/tools/fc_sort/fc_sort.c +++ b/tools/fc_sort/fc_sort.c @@ -507,9 +507,17 @@ int main(int argc, char *argv[]) (file_context_bucket_t *) malloc(sizeof(file_context_bucket_t)); if (!(bcurrent->next)) { - printf - ("Error: failure allocating memory.\n"); - return -1; + // Static analyzer complains about a + // memory leak of the memory used by the + // list created with bcurrent. We could + // try to deallocate it before returning + // it but since this is the "main" + // routine, it is not worth doing + // that. Just silence the static analyzer. + // NOLINTNEXTLINE + printf + ("Error: failure allocating memory.\n"); + return -1; } /* Make sure the new bucket thinks it's the end of the