diff options
author | Ivan Lozano <ivanlozano@google.com> | 2017-12-20 03:36:16 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-12-20 03:36:16 +0000 |
commit | 66d9ea6345308398c777318e2a40ab862ac81fed (patch) | |
tree | 04696ec0503e2d13ff22824532b6bc6b81e90809 /services | |
parent | 95e19cda6ea34f26312890a6be2a56279907fa83 (diff) | |
parent | 34ff878a0047387d86337daef6076dc328fe1d92 (diff) | |
download | native-66d9ea6345308398c777318e2a40ab862ac81fed.tar.gz |
Merge "Fix sanitizer in handleTransitionLocked."
Diffstat (limited to 'services')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 0b5262de30..624fda27f4 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2131,7 +2131,7 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags) // (ie: in drawing state but not in current state) // also handle displays that changed // (ie: displays that are in both lists) - for (size_t i=0 ; i<dc ; i++) { + for (size_t i=0 ; i<dc ;) { const ssize_t j = curr.indexOfKey(draw.keyAt(i)); if (j < 0) { // in drawing state but not in current state @@ -2166,7 +2166,7 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags) hw->disconnect(getHwComposer()); mDisplays.removeItem(display); mDrawingState.displays.removeItemsAt(i); - dc--; i--; + dc--; // at this point we must loop to the next item continue; } @@ -2188,6 +2188,7 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags) } } } + ++i; } // find displays that were added |