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

Commit f03a7f8a authored by Ivan Lozano's avatar Ivan Lozano Committed by android-build-merger
Browse files

Merge "Fix sanitizer in surfaceflinger waitForEvent." am: a7b2ac21

am: 8700fe47

Change-Id: Ia6d3700b16680adae040ce53367f677f3787d0e7
parents 043488d2 8700fe47
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -248,7 +248,7 @@ Vector< sp<EventThread::Connection> > EventThread::waitForEvent(

        // find out connections waiting for events
        size_t count = mDisplayEventConnections.size();
        for (size_t i=0 ; i<count ; i++) {
        for (size_t i=0 ; i<count ; ) {
            sp<Connection> connection(mDisplayEventConnections[i].promote());
            if (connection != NULL) {
                bool added = false;
@@ -279,11 +279,12 @@ Vector< sp<EventThread::Connection> > EventThread::waitForEvent(
                    // messages.
                    signalConnections.add(connection);
                }
                ++i;
            } else {
                // we couldn't promote this reference, the connection has
                // died, so clean-up!
                mDisplayEventConnections.removeAt(i);
                --i; --count;
                --count;
            }
        }