OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88ac6d9
)
fix some memory leaks.
author
Yunlian Jiang
<yunlian@google.com>
Wed, 1 Feb 2017 00:17:50 +0000
(16:17 -0800)
committer
Joe Onorato
<joeo@google.com>
Thu, 20 Apr 2017 17:28:00 +0000
(10:28 -0700)
This fixes some warnings like
warning: Potential leak of memory pointed to by 'target'
[clang-analyzer-cplusplus.NewDeleteLeaks]
Bug: None
Test: The warnings are gone.
Change-Id: I3708671bbc9965133439664b766df3236d1b01bf
tools/incident_report/main.cpp
patch
|
blob
|
history
diff --git
a/tools/incident_report/main.cpp
b/tools/incident_report/main.cpp
index
884b8e4
..
1d8809f
100644
(file)
--- a/
tools/incident_report/main.cpp
+++ b/
tools/incident_report/main.cpp
@@
-355,6
+355,7
@@
adb_incident_workaround(const char* adbSerial, const vector<string>& sections)
args[argpos++] = NULL;
execvp(args[0], (char*const*)args);
fprintf(stderr, "execvp failed: %s\n", strerror(errno));
+ free(args);
return 1;
} else {
// parent
@@
-400,6
+401,7
@@
adb_incident_workaround(const char* adbSerial, const vector<string>& sections)
}
}
+ free(buffer);
return 0;
}