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
diff --git a/tools/incident_report/main.cpp b/tools/incident_report/main.cpp
index 1d8809f6..4b67a3e98 100644
--- a/tools/incident_report/main.cpp
+++ b/tools/incident_report/main.cpp
@@ -529,6 +529,7 @@
args[argpos++] = NULL;
execvp(args[0], (char*const*)args);
fprintf(stderr, "execvp failed: %s\n", strerror(errno));
+ free(args);
return 0;
} else {
// parent