summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--logd/LogStatistics.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/logd/LogStatistics.cpp b/logd/LogStatistics.cpp
index 1305b0a..6f3a088 100644
--- a/logd/LogStatistics.cpp
+++ b/logd/LogStatistics.cpp
@@ -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;