Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c915528 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

logd: crash in prune mLastWorstPidOfSystem

(cherry-pick from commit 1eefca28)

mLastWorstPidOfSystem is supposed to be indexed by element->getPid()

Bug: 31237377
Bug: 30797725
Bug: 30688716
Change-Id: I81a55e92f175ded1c571a0aa8836736d86b36b1d
parent 67ca12c5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -691,7 +691,7 @@ bool LogBuffer::prune(log_id_t id, unsigned long pruneRows, uid_t caller_uid) {
                        && ((!gc && (element->getPid() == worstPid))
                            || (mLastWorstPidOfSystem[id].find(element->getPid())
                                == mLastWorstPidOfSystem[id].end()))) {
                    mLastWorstPidOfSystem[id][element->getUid()] = it;
                    mLastWorstPidOfSystem[id][element->getPid()] = it;
                }
                if ((!gc && !worstPid && (element->getUid() == worst))
                        || (mLastWorstUid[id].find(element->getUid())