Skip to content
Snippets Groups Projects
Commit dfdb9628 authored by Jeffrey Vander Stoep's avatar Jeffrey Vander Stoep Committed by android-build-merger
Browse files

Merge "Fix possible memory leak warning."

am: 3b24ce50

Change-Id: Ibfe45f0105811e120f4e83a52f3ba8e4d6b2fb10
parents bbd7ddaf 3b24ce50
No related branches found
No related tags found
No related merge requests found
...@@ -507,9 +507,17 @@ int main(int argc, char *argv[]) ...@@ -507,9 +507,17 @@ 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)) {
printf // Static analyzer complains about a
("Error: failure allocating memory.\n"); // memory leak of the memory used by the
return -1; // 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 /* Make sure the new bucket thinks it's the end of the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment