Skip to content
Snippets Groups Projects
Commit 3b24ce50 authored by Jeffrey Vander Stoep's avatar Jeffrey Vander Stoep Committed by Gerrit Code Review
Browse files

Merge "Fix possible memory leak warning."

parents 46f41134 635e3ecc
Branches
Tags
No related merge requests found
...@@ -507,6 +507,14 @@ int main(int argc, char *argv[]) ...@@ -507,6 +507,14 @@ int main(int argc, char *argv[])
(file_context_bucket_t *) (file_context_bucket_t *)
malloc(sizeof(file_context_bucket_t)); malloc(sizeof(file_context_bucket_t));
if (!(bcurrent->next)) { if (!(bcurrent->next)) {
// 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 printf
("Error: failure allocating memory.\n"); ("Error: failure allocating memory.\n");
return -1; return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment