summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorIvan Lozano <ivanlozano@google.com>2017-12-20 03:36:16 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-12-20 03:36:16 +0000
commit66d9ea6345308398c777318e2a40ab862ac81fed (patch)
tree04696ec0503e2d13ff22824532b6bc6b81e90809 /services
parent95e19cda6ea34f26312890a6be2a56279907fa83 (diff)
parent34ff878a0047387d86337daef6076dc328fe1d92 (diff)
downloadnative-66d9ea6345308398c777318e2a40ab862ac81fed.tar.gz
Merge "Fix sanitizer in handleTransitionLocked."
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp5
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