diff options
author | George Burgess IV <gbiv@google.com> | 2018-05-15 18:03:00 -0700 |
---|---|---|
committer | George Burgess IV <gbiv@google.com> | 2018-05-15 18:03:00 -0700 |
commit | 9fb8177ca5afef7e6becf897f04a42de8dd7db5b (patch) | |
tree | ec9f319545c4f24d39b427e0be00643180cb6631 | |
parent | b0ae3e5bfc4dce380c5d07f890402fe9f0a122d7 (diff) |
Fix a 'memory leak'
Realistically, this memory will be reclaimed by the OS when we return
here. Regardless, we do a similar cleanup above if an exec() function
fails, and having the free here makes our tooling slightly happier.
Complained about by the static analyzer
Bug: None
Test: Ran the analyzer. It no longer complains about this leak.
Change-Id: Ia7107c585cc38fef8bd7c59d85ff896b04e93658
-rw-r--r-- | tools/incident_report/main.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/incident_report/main.cpp b/tools/incident_report/main.cpp index 1d8809f6f603..4b67a3e983ac 100644 --- a/tools/incident_report/main.cpp +++ b/tools/incident_report/main.cpp @@ -529,6 +529,7 @@ main(int argc, char** argv) args[argpos++] = NULL; execvp(args[0], (char*const*)args); fprintf(stderr, "execvp failed: %s\n", strerror(errno)); + free(args); return 0; } else { // parent |