logd: LogStatistics leak
- uid = -1 in subtract operation to match add Change-Id: I7d0b85b5334c5264fd04309cb78e0c9aec0ad261
This commit is contained in:
parent
df5aa61f05
commit
f48ea7c8dc
1 changed files with 4 additions and 0 deletions
|
@ -307,6 +307,10 @@ void LidStatistics::add(unsigned short size, uid_t uid, pid_t pid) {
|
|||
}
|
||||
|
||||
void LidStatistics::subtract(unsigned short size, uid_t uid, pid_t pid) {
|
||||
if (uid == (uid_t) -1) { // init
|
||||
uid = (uid_t) AID_ROOT;
|
||||
}
|
||||
|
||||
UidStatisticsCollection::iterator it;
|
||||
for (it = begin(); it != end(); ++it) {
|
||||
UidStatistics *u = *it;
|
||||
|
|
Loading…
Reference in a new issue